HI, May be this helps: set.seed(5) dat1<-as.data.frame(matrix(sample(1:100,100,replace=TRUE),ncol=20)) dat1[,8:ncol(dat1)] A.K.
----- Original Message ----- From: eliza botto <eliza_bo...@hotmail.com> To: "r-help@r-project.org" <r-help@r-project.org> Cc: Sent: Wednesday, January 2, 2013 8:59 AM Subject: [R] column selection Dear R users, sorry for a very basic question. i wanted to ask that if your column are too much in number and you want to select the remaining columns, starting from column number 117. one way is to use usual command >q[ ,(117:2300)]. is there a way by which i can select the remaining columns starting from column number 117 without using the usual command or without giving the column number of the last column? more precisely, cant i use something like >q[ ,(117:remaining columns)] hope my question was clear. elisa [[alternative HTML version deleted]] ______________________________________________ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code. ______________________________________________ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.