[R] Hi: Help Using Spreadsheets

Petr PIKAL petr.pikal at precheza.cz
Fri Apr 6 11:27:19 CEST 2012


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