freqTable | R Documentation |
Creates 1-dimensional or 2-dimensional frequency tables
freqTable(df, var1, var2)
df |
a data.frame containing var1 and var2 |
var1 |
variable to count observations by |
var2 |
additional variable to count observations by (optional) |
A tibble with the number of observations per distinct value of var 1 and optionally var2
data(mpg) freqTable(mpg, "trans") freqTable(mpg, "trans", "year")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.