Re: [R] reading data into R

2012-05-15 Thread Ivan Calandra
Hi ! You need to assign the output of read.table() into an object; this is how R works: mydata <- read.table ("mydata1.csv", sep=",", header=T) mymean <- mean(mydata$var) You should read some introductory material. I found this useful: http://www.burns-stat.com/pages/Tutor/hints_R_begin.html

Re: [R] reading data into R

2012-05-15 Thread John Kane
e mean of X John Kane Kingston ON Canada > -Original Message- > From: myjacara...@yahoo.com > Sent: Tue, 15 May 2012 05:57:51 -0700 (PDT) > To: r-help@r-project.org > Subject: [R] reading data into R > > Hi I am really new using R, so this is really a beginner stuff!

Re: [R] reading data into R

2012-05-15 Thread R. Michael Weylandt
You need to assign your data set to something -- right now you're just reading it in and then throwing it away: dats <- read.csv("mydata1.csv") mean(dats$X) # Dollar sign, not ampersand Best, Michael On Tue, May 15, 2012 at 8:57 AM, jacaranda tree wrote: > Hi I am really new using R, so this i

Re: [R] reading data into R

2012-05-15 Thread Rui Barradas
hello, The error message is right, you have read the file have NOT assigned it to an object, to a variable. mydata1 <- read.table ("mydata1.csv", sep=",", header=T) Now you can use the variable 'mydata1'. It's a data.frame, and you can see what it looks like with the following instructions. st

[R] reading data into R

2012-05-15 Thread jacaranda tree
Hi I am really new using R, so this is really a beginner stuff! I created a very small data set on excel and then converted it to .csv file. I am able to open the data on R using the command "read.table ("mydata1.csv", sep=",", header=T)" and it just works fine. But when I want to work on the d

Re: [R] Reading data into R

2008-01-03 Thread Rubén Roa-Ureta
BEP wrote: > Hello all, > > I am working with a very large data set into R, and I have no interest in > reviving my SAS skills. To do this, I will need to drop unwanted variables > given the size of the data file. The most common strategy seems to be > subsetting the data after it is read into R

Re: [R] Reading data into R

2008-01-03 Thread Gabor Grothendieck
On Jan 3, 2008 9:00 AM, BEP <[EMAIL PROTECTED]> wrote: > Hello all, > > I am working with a very large data set into R, and I have no interest in > reviving my SAS skills. To do this, I will need to drop unwanted variables > given the size of the data file. The most common strategy seems to be >

[R] Reading data into R

2008-01-03 Thread BEP
Hello all, I am working with a very large data set into R, and I have no interest in reviving my SAS skills. To do this, I will need to drop unwanted variables given the size of the data file. The most common strategy seems to be subsetting the data after it is read into R. Unfortunately, given