# NOT RUN {
data(d.pizza)
# result is a data.frame
d.freq <- Freq(d.pizza$price)
d.freq
# it is printed by default with 3 digits for the percent values,
# but the number of digits can be defined in the print function
print(d.freq, digits=5)
# sorted by frequency
Freq(d.pizza$driver, ord="desc")
# sorted by name using all the observations, say including NAs
Freq(d.pizza$driver, ord="name", useNA="ifany")
# percentages and cumulative frequencies for a vector of count data
Freq(as.table(c(2,4,12,8)))
# }
Run the code above in your browser using DataLab