Muenchen, Robert A (Bob) wrote:
Ted,

I know how to do that. It's just such a standard display in SAS, SPSS
and Stata that I figured someone had done it and I had just overlooked
it.

Thanks!
Bob



I don't think there is a ready-made one, but it is very little
effort to make your own:

mkMyTable <- function(X){
  Table <- data.frame( table(X) )
  Table$Prop <- prop.table( Table$Freq )
  Table$CumProp <-  cumsum( Table$Prop )
  Table
}

myTable <- mkMyTable(Score)

Hoping this helps!
Ted.

I think CrossTable in gmodels does what Bob is after:

CrossTable(gmodels) R Documentation

Cross Tabulation with Tests for Factor Independence
Description
An implementation of a cross-tabulation function with output similar to S-Plus crosstabs() and SAS Proc Freq (or SPSS format) with Chi-square, Fisher and McNemar tests of the independence of all table factors.



David Scott

--
_________________________________________________________________
David Scott     Department of Statistics
                The University of Auckland, PB 92019
                Auckland 1142,    NEW ZEALAND
Phone: +64 9 923 5055, or +64 9 373 7599 ext 85055
Email:  d.sc...@auckland.ac.nz,  Fax: +64 9 373 7018

Director of Consulting, Department of Statistics

______________________________________________
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