Description Usage Arguments Examples
These functions work on character, numeric, or factor vectors. They are meant to make outputs easier to paste into table.
1 2 3 4 5 6 7 8 9 10 |
numvar |
A numeric vector |
na.rm |
(default TRUE) whether to remove NA values when summarizing numeric values |
varname |
An optional character string for the name of the vector (defaults to object name) |
digits |
The number of significant digits to show |
catvar |
A factor vector (categorical) |
var1 |
A character or numeric vector |
var2 |
A second categorical variable for crosstabulation |
... |
Variables to describe by the outcome, can be verctors or unquoted names when the data argument is supplied |
outcome |
The comparison variable, divides the data into categories |
data |
A data.frame containing the comparison variables |
headerRow |
A character vector for each variable in ... that serves as the descriptive name in the table |
headerFrame |
A data.frame that relates or maps each variable name to its respective descriptive name |
includeHeader |
logical (default TRUE) indicating whether or not to add a header row to the table with group counts for the outcome variable |
deparse.level |
controls how the default dnn is constructed. See 'table'. |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 | data(mtcars)
meansd(mtcars$mpg)
nprops(mtcars$gear)
with(mtcars, gmeans(mpg, am))
am <- plyr::mapvalues(mtcars$am, c(0, 1), c("Auto", "Manual"))
mtcars$vs1 <- plyr::mapvalues(mtcars$vs, c(0, 1), c("V Engine", "Straight"))
gmeans(mtcars$mpg, am)
crosstab(mtcars$vs1, am)
mtcars$cyl <- factor(mtcars$cyl)
describe(mpg, cyl, disp, outcome = am, data = mtcars)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.