[R] Frequency tables without underlying data
Uwe Ligges
ligges at statistik.uni-dortmund.de
Thu Aug 31 09:59:37 CEST 2006
Geoff Russell wrote:
> Hi from a new useR,
>
> I know how to build a table() with 2 factors(), but I want to build a
> table() when
> I only know the frequencies:
>
> e.g. I know that
>
> useR useStatA
> rich 100 200
> poor 200 5
X <- as.table(matrix(c(100, 200, 100, 5), ncol=2))
dimnames(X) <-
list(wealth = c("rich", "poor"), use = c("useR", "useStatA"))
Uwe Ligges
> but i don't have the underlying data to set up factors. Can I still make a
> frequency
> table?
>
> Cheers,
> Geoff Russell
>
> [[alternative HTML version deleted]]
>
> ______________________________________________
> R-help at stat.math.ethz.ch 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