Entering edit mode
5.0 years ago
demoraesdiogo2017
▴
100
Hello all
I have a very large dataset, with 11.000 cols and 50.000 rows. I have a list of about 2.000 names which can be found in the columns.
To extract only the columns with those 2000 names, I have used the function subset like this
mysubset <- subset(mybigdata, select = c("name1", "name2", ... "name2000")
I got a few error messages and thought something could be wrong with the names or the code, but after a few tests it seems these errors do not occur if I limit my subsets to about 50 names per line. This, of course, makes the subsetting very laborious (especially since I might have to repeat this process).
Can you recommend an alternative?