Entering edit mode
5.4 years ago
azadsaei
•
0
Hi, I have the following file. I want to have specific rows (eg.2 and 3) and remove rest of the rows which doesnt have any data (X). Is there a way you could help me to write the code in R for this?
The other solution is;
Yeah, but this is not generic. Imagine a df with 1000 columns, you are not going to type that command for 1000 columns for sure.
I did not say this is the best solution. This is the another way of solving the current solution. Imagine you want to keep just rows with "X", you can easily modify the code and keep those rows.