[R] Help Using Spreadsheets

Pedro Henrique lamarao at superig.com.br
Fri Apr 6 15:08:09 CEST 2012


Hi, Petr,
Thanks for answering.
Yes, I do read the file with the "read.xls" command but I do not know how to 
read it into an object.
I read the R-into document chapter of objects, but I is still not clear for 
me how to transform this kind of data into an object.

Regards,

Lämarao


----- Original Message ----- 
From: "Petr PIKAL" <petr.pikal at precheza.cz>
To: "Pedro Henrique" <lamarao at superig.com.br>
Cc: <r-help at r-project.org>
Sent: Friday, April 06, 2012 6:27 AM
Subject: Hi: [R] Help Using Spreadsheets


Hi
> Hello,
>
> I am a new user of R and I am trying to use the data I am reading from a

> spreadsheet.
> I installed the xlsReadWrite package and I am able to read data from
this
> files, but how can I assign the colums into values?
> E.g:
> as I read a spreadsheet like this one:

Maybe with read.xls? Did you read it into an object?

> A B
> 1 2
> 4 9
>
> I manually assign the values:
> A<-c(1,4)
> B<-c(2,9)

Why? If you read in to an object (e.g. mydata)


>
> to plot it on a graph:
> plot(A,B)

plot(mydata$A, mydata$B)


>
> or make histograms:
> hist(A)

hist(mydata$A)

>
> But actualy I am using very large colums, does exist any other way to do

> it automatically?

Yes. But before that you shall automatically read some introduction
documentation like R-intro)

Regards
Petr

>
> Best Regards,
>
> Lämarăo
>    [[alternative HTML version deleted]]
>
> ______________________________________________
> R-help at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide
http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.



More information about the R-help mailing list