[R] Help Using Spreadsheets

jim holtman jholtman at gmail.com
Fri Apr 6 19:07:39 CEST 2012


You might want to re-read the "Intro to R" and the section on
dataframes.  Your spreadsheet is read into R as a dataframe which is
very similar to an Excel spreadsheet.  Exactly what problem are you
having with it?  Is it trying to access the data?

2012/4/6 Pedro Henrique <lamarao at superig.com.br>:
> 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.
>
>
> ______________________________________________
> 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.



-- 
Jim Holtman
Data Munger Guru

What is the problem that you are trying to solve?
Tell me what you want to do, not how you want to do it.



More information about the R-help mailing list