Usage
freq(x, breaks = hist(x, plot = FALSE)$breaks, digits = 2,
include.lowest = TRUE, ord = c("level", "desc", "asc", "name"),
useNA = c("no", "ifany", "always"), ...)
Arguments
x
The variable to be described.
breaks
Either a numeric vector of two or more cut points or a integer (> 2) for the intervals. If not provided, the default is taken from hist()
. This parameter is ignored if x is not of class numeric.
digits
An integer for the decimals.
include.lowest
A logical, indicating if an x[i] equal to the lowest (or highest, for right = FALSE
) "breaks"
value should be included. Ignored if x is not of numeric type.
ord
How should the result be ordered. Default is "level"
, other choices are by frequency: ("desc"
or "asc"
) or 'by name of the levels' ("name"
).
useNA
A character parameter to be passed to table
.
...
Further arguments are: cut()
, and right
to define if the intervals should be closed on the right (and open on the left) or vice versa.