[R] Remove [1] ... from output

Philipp Pagel philipp.pagel.lists at t-online.de
Tue Mar 28 16:21:40 CEST 2006


On Tue, Mar 28, 2006 at 01:21:59PM +0200, Gregor Gorjanc wrote:
> 
> R> runif(20)
>  [1] 0.653574 0.164053 0.036031 0.127208 0.134274 0.103252 0.506480 0.547759
>  [9] 0.912421 0.584382 0.987208 0.996846 0.666760 0.053637 0.327590 0.370737
> [17] 0.505706 0.412316 0.887421 0.812151
> 
> Any hints how to solve my task?

The indexes are generated by the print method for the vector. Use cat
instead:

> cat(runif(20))
0.01053970 0.7196873 0.08709377 0.2059949 0.9583586 0.7059125 0.8179168
0.2345666 0.4157858 0.0538792 0.4140722 0.5700817 0.7087922 0.4012365
0.6587029 0.2803821 0.7353465 0.4457628 0.09914006 0.8109087

cu
	Philipp

-- 
Dr. Philipp Pagel                            Tel.  +49-8161-71 2131
Dept. of Genome Oriented Bioinformatics      Fax.  +49-8161-71 2186
Technical University of Munich
Science Center Weihenstephan
85350 Freising, Germany

 and

Institute for Bioinformatics / MIPS          Tel.  +49-89-3187 3675
GSF - National Research Center               Fax.  +49-89-3187 3585
      for Environment and Health
Ingolstädter Landstrasse 1
85764 Neuherberg, Germany
http://mips.gsf.de/staff/pagel




More information about the R-help mailing list