powered by
Computes profiles (frequencies or percentages) for subgroups of observations defined by the levels of a categorical variable.
profiles(X, y, weights = NULL, stat = "cprop", mar = TRUE, digits = 1)
A data frame with profiles in columns
data frame. The variables which are described in the profiles. There should be only factors.
factor. The categorical variable which defines subgroups of observations whose profiles will be computed.
numeric vector of weights. If NULL (default), uniform weights (i.e. all equal to 1) are used.
character. Whether to compute frequencies ("freq"), percentages ("prop"), row percentages ("rprop") or column percentages ("cprop", default).
logical, indicating whether to compute margins. Default is TRUE.
numeric. Number of digits. Default is 1.
Nicolas Robette
catdesc, assoc.yx, darma, assoc.twocat, assoc.twocat.by
catdesc
assoc.yx
darma
assoc.twocat
assoc.twocat.by
data(Movies) profiles(Movies[,c(2,4,5)], Movies$Country)
Run the code above in your browser using DataLab