freq {descr} | R Documentation |
Prints a frequency table of the selected object. Optionally, the frequency might be weighted.
freq(x, w, plot = getOption("descr.plot"), y.axis = c("count", "percent"), ...)
x |
The factor from which the frequency of values is desired. |
w |
An optional vector for a weighted frequency table. |
plot |
Logical: if TRUE (default), a barplot is produced.
You may put options(descr.plot = FALSE) in your ‘.Rprofile’ to
change the default function behavior. |
y.axis |
Character string, indicating what variable to use in the y axis: "count" or "percent". |
... |
Further arguments to be passed to
barplot . |
A column with cumulative percents are added to the frequency table if x
is an ordered factor
.
A list with class freqtable
containing the following components:
label |
A character string correponding to either the attribute "label"
of x or, if x does not have this attribute, the name of
x . |
freqtable |
A matrix with frequencies, sums and standard deviations. |
Jakson A. Aquino jalvesaq@gmail.com, based on function written by Dirk Enzmann