[R] Read dataset in R language

Millo Giovanni Giovanni_Millo at Generali.com
Wed Dec 16 12:47:57 CET 2009


Hello.
This is to get you started with data.frames, next time please 
- read the posting guide
- see the documentation, especially the builtin "R data import/export"
manual form the help menu

## begin R examples, paste into console ##
data(mtcars) # builtin database
class(mtcars) # what it is
mtcars # print it out...
head(mtcars) # ...better: see first rows
fm <- mpg~hp+wt
summary(lm(fm, data=mtcars)) # my favourite regression: see ?mtcars
save(mtcars, file="mtcars.rda") # save as R binary in current working
directory
load(file="mtcars.rda") # load from R binary file, get directly an R
object
write.table(mtcars, file="mtcars.txt") # write to text file (default is
space-delimited)
mtcars <- read.table(file="mtcars.txt") # read from text file and assign
to an R object

## see help for all these functions as 
?data
?read.table
## etc.
## end ##

Data import/export is the nastiest step in any stats program, hold on
;^) ...and start with small examples: your "new" message probably means
you don't have enough RAM (although from your post it is impossible to
really tell).
Giovanni

Giovanni Millo
Research Dept.,
Assicurazioni Generali SpA
Via Machiavelli 4, 
34132 Trieste (Italy)
tel. +39 040 671184 
fax  +39 040 671160 

------------------------------

Original Message
Date: Wed, 16 Dec 2009 12:26:03 +0200
From: Nancy Adam <nancyadam84 at hotmail.com>
Subject: Re: [R] Read dataset in R language.
To: <ehlers at ucalgary.ca>
Cc: r-help at r-project.org
Message-ID: <SNT122-W4335798ADCADAC8E0F70A0B1870 at phx.gbl>
Content-Type: text/plain


Hi all,

I tried many things to read any dataset but I receive different error
messages every time.
One new message is: vector size specified is too large

Can any one please send any part from any dataset just for testing a
regression system and to know where is the problem??

Many thanks,
Nancy

Ai sensi del D.Lgs. 196/2003 si precisa che le informazi...{{dropped:13}}




More information about the R-help mailing list