[R] show colums x till end

Eik Vettorazzi E.Vettorazzi at uke.uni-hamburg.de
Mon Jun 27 18:01:18 CEST 2011


Hi,
mydata[1:3, -(1:4)]

saves some typing.

cheers

Am 27.06.2011 16:51, schrieb Berry Boessenkool:
> 
> 
> Hey again,
> 
> I didn't wat questions to get mangled up, so here's my second email.
> 
> In matlab, there is the simple possibility to access colums x till last of a matrix using
> mydata(1:3, 5:end).
> 
> In R, I so far use
> mydata[1:3, 5:ncol(mydata)]
> 
> Is there a faster way? (in terms of typing)
> 
> Thanks ahead,
> Berry
> 
> -------------------------------------
> Berry Boessenkool
> University of Potsdam, Germany
> -------------------------------------
>  		 	   		  
> ______________________________________________
> R-help at 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.

-- 
Eik Vettorazzi

Department of Medical Biometry and Epidemiology
University Medical Center Hamburg-Eppendorf

Martinistr. 52
20246 Hamburg

T ++49/40/7410-58243
F ++49/40/7410-57790



More information about the R-help mailing list