I\'m wondering if there is a good way to delete multiple columns over a few different data sets in R. I have a data set that looks like:
RangeNumber Time
Rather than delete, just choose the columns that you want, i.e.
data1 = data1[, c(2, 3)]
The question still remains about your other data sets: data2
, etc. I suspect that since your data frames are all "similar", you could combine them into a single data frame with an additional identifier column, id
, which tells you the data set number. How you combine your data sets depends on how you data is stored. But typically, a for
loop over read.csv
is the way to go.