[R] Cross tabulation with top one variable and side as multiple variables

David Winsemius dwinsemius at comcast.net
Tue Jun 9 19:50:33 CEST 2015


On Jun 9, 2015, at 1:40 AM, jagadishpchary wrote:

> Hi:
> 
> I have a huge data with lot of variables and I need to check the trend
> variations from year to year. In order to do so, I have to cross tabulate
> the year variable as top (constant) and all the remaining variables as side
> (attached the cross tabulation report). I have searched the forums but the
> syntax I could find for cross tabulation is between 2 or 3 variables. So i
> would request to provide a code which can print the data in the same way as
> in the attached.  <http://r.789695.n4.nabble.com/file/n4708379/Untitled.png> 

I think you will find that people on this list expect you to provide data in the form of text rather than pictures. When I looked at the request there were two routes I considered: 1) combine margin.table with ftable and 2) investigate one of (but not both) of plyr or dply packages.
> 
> 
> View this message in context: http://r.789695.n4.nabble.com/Cross-tabulation-with-top-one-variable-and-side-as-multiple-variables-tp4708379.html
> Sent from the R help mailing list archive at Nabble.com.

Nabble is neither the R help mailing list nor its archive.

Nabble also removes this message from replies. You should read the material about the list.

> R-help at r-project.org mailing list -- To UNSUBSCRIBE and more, see
> 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.

David Winsemius
Alameda, CA, USA



More information about the R-help mailing list