freq {CUFF}R Documentation

Frequencies

Description

Functions to display frequency

Usage

freq(x, y = NULL, ..., labels = NULL, data = NULL)
## S3 method for class 'frequencies'
print(x, ..., toLatex = FALSE)

Arguments

x

Object of type formula, matrix or data.frame

y

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

...

used for compatibility

labels

Optional vector of labels the same length as the dimension of x or the number of variables in formula.

data

see y for details

toLatex

Logical value that indicates if the print methods should return a tabular latex environment to use with Sweave or knitr.

Details

The freq methods returns an object of type frequencies object with a print methods associated.

Value

An object of type "frequencies" that is a list of matrix containing the frequencies the % and the % with missing value.

Author(s)

Charles-Édouard Giguère

Examples

require(CUFF)
### example of crosstabs
fr1 <- freq( ~ N + P, npk, c("Nitrogen", "Phosphate"))
fr1
### To use with sweave or knitr.
print(fr1, toLatex = TRUE)

[Package CUFF version 1.9 Index]