Description Usage Arguments Value Examples
View source: R/statistic_functions.R
A convenient method to describe a full data.frame.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 |
data |
a data.frame containing the data to describe |
variables |
a character vector contening the name of columns to describe. Default to colnames(data). |
applicable |
a list of boolean vector generating based on manageNotApplicable(). Use in cas of NonApplicable data |
group |
a character vector of length 1. The name of the factor column to use as commparaison group. Default to NULL. |
group_str |
a numeric vector. The index of the levels of the group variable to use. Default to NULL. |
p_value |
a boolean. If TRUE, comparaison test are performed. |
all |
a boolean. If TRUE, total column will be displayed. Default to FALSE |
desc |
a character vector. Could contain "Mean", "Median", "Range" and/or "Mode" |
round |
an integer, number of maximal decimal. Default to 3 |
confint |
a boolean. If TRUE, the confidence interval of the mean will be displayed. Default to FALSE |
NA_asModality |
a boolean. If TRUE, missing data of the factor variable to describe will be considered as levels. Default to FALSE |
NA_group_AsModality |
a boolean. If TRUE, missing data of the group variable will be considered as levels. Default to FALSE |
a data.frame containing the description of the variables
1 2 3 4 5 6 7 8 9 10 11 12 13 | data(mtcars)
labels <- data.frame(Variable = c("vs", "vs", "am", "am"),
Modality = c(0, 1, 0, 1),
Label = c("V-shaped", "Straight", "Automatic", "Manual"))
labelVariable <- data.frame(Variable = c("mpg", "cyl", "disp", "hp", "drat", "wt",
"qsec", "vs", "am", "gear", "carb"),
Label = c("Miles/(US) gallon", "Number of cylinders", "Displacement (cu.in.)",
"Gross horsepower ", "Rear axle ratio", "Weight (1000 lbs)",
"1/4 mile time", "Engine", "Transmission", "Number of forward gears",
"Number of carburetors"))
labelledData <- statsBordeaux::labellisationDataFrame(mtcars, labels)
labelledData <- statsBordeaux::setLabelToVariable(labelledData, labelVariable)
comparaison <- describeDataFrame(mtcars, group = "vs", p_value = TRUE)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.