freq {descr} | R Documentation |
Prints a frequency table of the selected object. Optionally, the frequency might be weighted.
freq(x, w, returnMatrix = FALSE, digits = 6, na.print = "", plot = getOption("descr.plot"), barchart = "count", ...)
x |
The factor from which the frequency of values is desired. |
w |
An optional vector for a weighted frequency table. |
returnMatrix |
If TRUE , the return value will be of class
"matrix". |
digits |
Minimal number of significant digits, see
print.default . |
na.print |
A character string which is used to indicate
NA values in printed output (see
print.default ). |
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. |
barchart |
Character string, indicating what variable to use in the y axisto use: "count" or "percent". |
... |
Further arguments to be passed to
barplot . |
An object of class freqtable if x
has the attribute "label" and
returnMatrix
is false. Otherwise, a object of class "matrix".
Jakson A. Aquino jalvesaq@gmail.com, based on function written by Dirk Enzmann