[R] help
Steve Lianoglou
mailinglist.honeypot at gmail.com
Mon Feb 28 16:36:35 CET 2011
Hi,
It's hard (for me) to parse how the data you listed below is meant to
be structured.
There's a rather large document explaining different methods of
import/exporting data to/from R:
http://cran.r-project.org/doc/manuals/R-data.pdf
In short, though, if your data well structured in excel, you can just
save it as a csv, and use the read.table, or read.csv functions in R
to import it into a data.frame object.
As far as frequency tables and bar graphs go, look at the
documentation for functions like ?table and ?barplot
If you need more help, please provide some code that shows what you're
trying to do and the errors you are getting. You might get more useful
help that way.
-steve
On Mon, Feb 28, 2011 at 10:02 AM, Laura Clasemann <violagirl470 at msn.com> wrote:
>
> Hi,
>
> I was wondering if anyone could provide me with help in entering the dataset below into R? I've been having a hard time in trying to figure out how to assemble it into both a frequency table and a bar graph within R. I've been trying to present the way I had the data arranged, as below, in Excel Spreadsheet into R. I am uncertain what the correct commands and exact techniques are into getting it correctly organized in R. Any help would be greatly appreciated! Thank you!
>
>
>
>
>
>
>
>
> Diet
> Binger-Yes
> Binger-No
> Total
>
> None
> 24
> 134
> 158
>
> Healthy
> 9
> 52
> 61
>
> Unhealthy
> 23
> 72
> 95
>
> Dangerous
> 12
> 15
> 27
>
> Laura
>
> [[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.
>
--
Steve Lianoglou
Graduate Student: Computational Systems Biology
| Memorial Sloan-Kettering Cancer Center
| Weill Medical College of Cornell University
Contact Info: http://cbio.mskcc.org/~lianos/contact
More information about the R-help
mailing list