[R] Reading in data

Jim Lemon bitwrit at ozemail.com.au
Wed Feb 10 12:13:44 CET 1999


Josef,

One easy way is to use "read.table" to create a data frame.  For
example, if you have an ASCII file of the following format:

subject,sex,height,weight,age
001,M,183,72,53
002,F,167,55,28
...

called "people.dat" you can create a data frame object with the command

people.df<-read.table("people.dat",header=T,sep=",")

see read.table in the help pages.

Jim

-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-help-request at stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._



More information about the R-help mailing list