On Wed, Sep 8, 2010 at 6:40 PM, Jonathan Finlay <jmfinl...@gmail.com> wrote: > hi, i'm new in R and i need some help. Please, żdo you know a function how > can process cross tables for many variables and show the result in one table > who look like this?: > > +----------------------------------------------------+ > |------------------ | X variable | > |----------------- | Xop1 | Xop2 | Xop3|.....| > +----------------------------------------------------+ > |Yvar1 | Total | %row..........................| > | | Op1 | %row..........................| > | | Op2 | %row..........................| > |+---------------------------------------------------+ > |Yvar2 | Op1 | %row..........................| > | | Op2 | %row...........................| > +----------------------------------------------------+ > |Yvar3 | Op1 | %row..........................| > | | Op2 | %row...........................| > | | Op3 | %row...........................| > |+---------------------------------------------------+ > > Like a pivot table! > > thanks a lot. >
Try this: library(Hmisc) example(summary.formula) library(gmodels) example(CrossTable) library(remix) example(remix) -- Statistics & Software Consulting GKX Group, GKX Associates Inc. tel: 1-877-GKX-GROUP email: ggrothendieck at gmail.com ______________________________________________ R-help@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.