Re: [R] help

From: Steve Lianoglou <mailinglist.honeypot_at_gmail.com>
Date: Mon, 28 Feb 2011 10:36:35 -0500

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

______________________________________________
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.
Received on Mon 28 Feb 2011 - 15:39:22 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Mon 28 Feb 2011 - 15:40:17 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.

list of date sections of archive