Description Usage Arguments Details Value Note Author(s) See Also Examples
Calculates one or more frequency table(s) from a vector, matrix or data frame.
1 |
x |
a vector, matrix or data frame. |
variable.labels |
optional labels for the variables. The default is the name of the variable passed or the names attribute if the variable has more than 1 dimension. |
display.na |
logical - whether to display counts of NAs. |
decr.order |
Whether to order each frequency table in decreasing order. |
freq calls table to get the frequency counts and builds a list with one or more components containing the value labels and counts.
A list with one or more components. Each component includes the values of the relevant variable as the names.
The limit on the number of bins has been removed, so passing a numeric vector with many levels may produce a huge, useless "frequency" table.
Jim Lemon
print.freq
1 2 3 4 5 6 |
Frequencies for A
1 5 8 3 10 6 2 9 7 4 NA
19 18 15 14 12 11 10 10 9 6 6
% 14.6 13.8 11.5 10.8 9.2 8.5 7.7 7.7 6.9 4.6 4.6
%!NA 15.3 14.5 12.1 11.3 9.7 8.9 8.1 8.1 7.3 4.8
Frequencies for C
L C F B E A D M J H N I K G NA
15 13 13 12 10 9 9 9 8 7 7 5 4 2 7
% 11.5 10 10 9.2 7.7 6.9 6.9 6.9 6.2 5.4 5.4 3.8 3.1 1.5 5.4
%!NA 12.2 10.6 10.6 9.8 8.1 7.3 7.3 7.3 6.5 5.7 5.7 4.1 3.3 1.6
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.