-
Alrighty, I have a table that's going to require a lot of manipulation and I think I need some help/suggestions on how to approach it. The table is here: https://github.com/epigeneticstoocean/2018_L18-adult-methylation/blob/main/data/whole_tx_table.csv It's a large CSV with 67,891 rows. Here's an excerpt of what it looks like:
What I want:
Problems that I need to figure out how to handle:
If anyone can suggest an approach, I'd greatly appreciate. Feeling a bit overwhelmed when looking at this table and having to handle so many exceptions within the data. |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 8 replies
-
I would you create new column that takes Not super easy but idea.. would probably need to split, edit and stack back. |
Beta Was this translation helpful? Give feedback.
-
Making progress... Counting unique table(whole_tx_table[,"gene_name"]) |
Beta Was this translation helpful? Give feedback.
-
Guess I should've just gone to StackOverflow right away. Posted my problem and received a solution in Here's the solution, which is based off of the example table I posted above: library(dplyr)
desired_result = your_data %>%
group_by(name_of_first_column) %>%
summarize(across(everything(), ~sum(. > 0))) I'll have to figure out some usage of |
Beta Was this translation helpful? Give feedback.
Guess I should've just gone to StackOverflow right away. Posted my problem and received a solution in
R
in less than 5 minutes (seriously).Here's the solution, which is based off of the example table I posted above:
I'll have to figure out some usage of
select()
to get the full input table and I'll have to figure out a way to programmatically rename all the columns in the output data, but that seems much more feasible for my skillset.