[R] Help with tables in R

Jeff Newmiller jdnewmil at dcn.davis.CA.us
Thu Jul 3 10:05:18 CEST 2014


Your question is vague. You say you have code that does what you want it to, yet do not share an example of it as a starting point, or explain what you have not been able to do. It is the nature of the Internet that you have to be precise in describing your problems and desired solutions.

When I read "populate tables" I think of input processing, yet you say you already have code, suggesting that you have successfully read in your data to R.

Since you attempted to attach Excel files to a posting, I assume you have not yet read the Posting Guide mentioned at the bottom of this (or any other email from this mailing list) since that document warns against attaching non-text files. Please read it. Also, we tend to "speak" in R on this list rather than translating from other programming dialects, especially proprietary ones... that is your responsibility. Sort of like foreign language immersion. :-)

A word to the wise... it is significantly easier to read in CSV data than XLS or XLSX data in R. For getting started in R I highly recommend exporting your XLSX data to CSV.

You may find [1] helpful in formulating a reproducible example to get the ball rolling more effectively.

[1] http://stackoverflow.com/questions/5963269/how-to-make-a-great-r-reproducible-example

---------------------------------------------------------------------------
Jeff Newmiller                        The     .....       .....  Go Live...
DCN:<jdnewmil at dcn.davis.ca.us>        Basics: ##.#.       ##.#.  Live Go...
                                      Live:   OO#.. Dead: OO#..  Playing
Research Engineer (Solar/Batteries            O.O#.       #.O#.  with
/Software/Embedded Controllers)               .OO#.       .OO#.  rocks...1k
--------------------------------------------------------------------------- 
Sent from my phone. Please excuse my brevity.

On July 2, 2014 7:33:12 PM PDT, Barry Lambert <barrylambert at gmail.com> wrote:
>I am a new convert to R (from SAS).  I am a research scientist and most
>of
>my
>use of SAS was in data analysis.  Recently, I have been wanting to use
>R to
>create a simple, reliable way to summarize a dataset of student
>demographics
>for a university.
>The spreadsheet has a row for every student registered at the
>university for
>each term since fall 2010 with the following information about each
>student
>in columns:
>Columns are the following: Term, College, Program, Campus, Gender,
>Ethnicity, Age.
>
>I have created summary tables in Excel using if/then type formulas to
>select
>data and count the number of female students in program A at location
>3,
>etc.
>
>I have written some R code to create some figures that generally meet
>my
>needs.
>I would like to find a way to have R populate some tables with this
>type of
>information.
>
>An example of my excel sheets are attached.
>
>
>Any suggestions will be appreciated.
>
>
>------------------------------------------------------------------------
>
>______________________________________________
>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