Filtering columns in R
I have two datasets, and am trying to filer columns in R based on these. The first dataset has three columns; two identifiers and a SNP value. The second only has identifiers in one column.
I am trying to filter such that if the second data sets identifiers are in either of the first datasets columns, the row is not deleted. However, if the first dataset has identifiers that are not in the second date set, that row should be deleted. Can I use dplyr/something else to do so? I have been trying to define a subset of matches and then use this to filter but I'm not sure exactly how to best do so.
• 714 views
•
link
0 answers
No answers yet.
Log in to answer this question.
Hello rose!
We believe that this post does not fit the main topic of this site.
This is a pure R question. Please search StackOverflow
For this reason we have closed your question. This allows us to keep the site focused on the topics that the community can help with.
If you disagree please tell us why in a reply below, we'll be happy to talk about it.
Cheers!