On Thu, 2007-12-06 at 12:51 +0000, christopher snow wrote:
> I have a dataset with two variables that are factors:
> 
> 1) Decision Making Satisfaction (DMS), values = A - Completely, B - 
> Mostly, C - Partly, D - Not at all
> 2) IT Satisfaction values (ITS), values = A - Completely, B - Mostly, C 
> - Partly, D - Not at all
> 
> I would like to produce a table (matrix) and a chart of the factors, 
> with counts at the cross sections:
> 
>          A   B   C   D
> A   
> B       counts
> C
> D
> 
> How can I do this in R?
> 
> Many thanks,
> 
> Chris


See ?table, for example:

  table(DMS, ITS)

You did not indicate the type of chart you want to create, but some
possibilities, using base graphics, would be barplot(), dotchart() and
mosaicplot(). The latter is in the vcd package on CRAN.

HTH,

Marc Schwartz

______________________________________________
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.

Reply via email to