Let\'s say I have a some table, T. Assume T has 5 columns. I understand how to select any consecutive subset of columns and store them as a new table. For that I would use brack
If I understand your question correctly, you should try something similar to the following:
df1 = data.frame(state=c("KS","CO","CA","FL","CA"), value=c(1,2,3,7,9)) df1 df1[c(c(1,3),4:5),] df1[c(1,3,4:5),]