[R] Help

Uwe Ligges ligges at statistik.uni-dortmund.de
Mon Dec 8 13:05:52 CET 2003


Stephen Opiyo wrote:

> Hi,
> 
> I have a data set (data frame) approx. 50 rows * 600 columns. The 
> columns are separated by commas. I would like to know how to remove 
> those commas  between the columns. What should I do to remove those 
> commas? 


I guess during the import of the data?
Please read the R Data Import/Export manual and the help page 
?read.table. It tells you how to use the argument "sep".


> Secondly, if I want only to use part of the (data frame), say  
> (50 rows * 300 columns) instead of (50 rows * 600 columns), what should 
> I do?

Index the data frame appropriately.

See the manual "An Introduction to R". Also, the help page ?data.frame 
points you to subsetting methods in its "See Also" Section.

Uwe Ligges


> Thanks,
> 
> Stephen
> 
> ______________________________________________
> R-help at stat.math.ethz.ch mailing list
> https://www.stat.math.ethz.ch/mailman/listinfo/r-help




More information about the R-help mailing list