proc_freq | R Documentation |
An R function to do some of the calcuations thatt SAS's PROC FREQ does. I found this function on page 10 of An Introduction to Categorical Data Analysis Using R by Brett Presnell. It's just too fun not to include this somehow. See references for link.
proc_freq(x, digits = 4)
x |
A table or matrix |
digits |
Doesn't do anything that I can tell |
A list
http://users.stat.ufl.edu/~presnell/Courses/sta4504-2000sp/R/R-CDA.pdf
jobsatis <- c(2,4,13,3, 2,6,22,4, 0,1,15,8, 0,3,13,8)
jobsatis <- matrix(jobsatis,byrow=TRUE,nrow=4)
dimnames(jobsatis) <- list(
Income=c("<5","5-15","15-25",">25"),
Satisfac=c("VD","LS","MS","VS"))
jobsatis
class(jobsatis)
jobsat_freq <- proc_freq(jobsatis)
jobsat_freq
library(vcd)
SexualFun
class(SexualFun)
proc_freq(SexualFun)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.