In a file (1000 columns, 2000 rows), for each column there is another column next to it. something like:
[,1] [,2] [,3] [,4] [,5] [,6]
3 3 4 4 4 6
6 5 2 2 5 1
9 1 3 5 4 1
2 5 6 4 8 5
6 1 5 2 3 1
I want to remove those values which their corresponding value is 1
the result:
[,1] [,3] [,5]
3 4 4
6 2 8
2 3
6
5
To echo what @shellter said, it’s both helpful and polite to include what you’ve tried in the question.
Here’s a compact way to accomplish this using
splitandmapply.