powered by
Functions to display frequency
freq(x, y = NULL, ..., labels = NULL, data = NULL) # S3 method for frequencies print(x, ..., toLatex = FALSE)
An object of type "frequencies" that is a list of matrix containing the frequencies the % and the % with missing value.
matrix
Object of type formula, matrix or data.frame
formula
data.frame
If x is a formula,y or data contains the data from x or are set to NULL if the variables are in the main environment
y
data
used for compatibility
Optional vector of labels the same length as the dimension of x or the number of variables in formula.
see y for details
Logical value that indicates if the print methods should return a tabular latex environment to use with Sweave or knitr.
Charles-Édouard Giguère
The freq methods returns an object of type frequencies object with a print methods associated.
freq
frequencies
print
require(CUFF) ### example of crosstabs fr1 <- freq( ~ N + P, npk, c("Nitrogen", "Phosphate")) fr1 ### To use with sweave or knitr. print(fr1, toLatex = TRUE)
Run the code above in your browser using DataLab