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
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!
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
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
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
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
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
>
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
8 matches
Mail list logo