[R] column selection

Berend Hasselman bhh at xs4all.nl
Wed Jan 2 15:13:36 CET 2013

On 02-01-2013, at 14:59, eliza botto <eliza_botto at hotmail.com> wrote:

> 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.

q[, -(1:116)]
q[, 117:ncol(q)]


More information about the R-help mailing list