Description Usage Arguments Value Examples
Cursory functions act like the dplyr
summarize_(all|at|if)
functions with an important difference, they put the variable name
in a column and for each function passed in it puts the value in
it's own column.
cursory_all()
is the analog of dplyr::summarize_all()
cursory_at()
is the analog of dplyr::summarize_at()
cursory_if()
is the analog of dplyr::summarize_if()
1 2 3 4 5 | cursory_all(.tbl, .funs, ..., var.name = "Variable")
cursory_at(.tbl, .vars, .funs, ..., var.name = "Variable")
cursory_if(.tbl, .predicate, .funs, ..., var.name = "Variable")
|
.tbl |
A |
.funs |
A function |
... |
Additional arguments for the function calls in
|
var.name |
Name of the column with variable names. |
.vars |
A list of columns generated by |
.predicate |
A predicate function to be applied to the columns
or a logical vector. The variables for which |
A tibble with columns from the groups, the var.name
column, and columns corresponding to each of function from .funs
.
1 2 3 4 5 6 7 8 9 10 11 | library(dplyr)
data(iris)
## basic summary statistics for each variable in a data frame.
cursory_all(group_by(iris, Species), lst(mean, sd))
## summary statistics for only numeric variables.
cursory_if(iris, is.numeric, lst(mean, sd))
## summary statistics for specific variables.
cursory_at(iris, vars(ends_with("Length")), lst(Variance = var))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.