table0 | R Documentation |
table
with better defaultsFirst, table0
is a version of table()
in base R that automatically supplies useNA = "always"
.
See that function for documentation. Second, table1
is a wrapper for table0
that takes a single vector and
automatically returns the proportions (rather than frequencies) and rounds these to two digits.
table0(
...,
exclude = if (useNA == "no") c(NA, NaN),
useNA = c("no", "ifany", "always"),
dnn = list.names(...),
deparse.level = 1
)
table0(mtcars$cyl, mtcars$gear)
# note that table1 only takes one argument, a vector
table1(mtcars$gear)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.