Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

freq

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)

CUFF

Charles's Utility Function using Formula

v1.7
GPL (>= 2)
Authors
Charles-Édouard Giguère
Initial release
2020-09-16

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.