View source: R/DataUnderstanding.R
freqTable | R Documentation |
Provides a table with absolute and relative number of cases. The output table can be easily used in Markdown with kable().
freqTable(x, printNA = TRUE)
x |
vector. Should be a vector. |
printNA |
boolean. Print NA values? Default is TRUE |
Per default NA values will be displayed, no matter if there are any. Set 'printNA' argument to FALSE to surpress NA values. Please note: If there are any NA values in x (variable), a warning will be issued!
data.frame. absolute and relative values
## iris freqTable(x = iris$Species, printNA = TRUE) ## mtcars # automatic or manual? freqTable(x = mtcars$am, printNA = FALSE) # number of gears freqTable(x = mtcars$gear, printNA = FALSE) # NA values in variable freqTable(x = airquality$Ozone, printNA = TRUE) freqTable(x = airquality$Ozone, printNA = FALSE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.