desc | R Documentation |
Makes descriptive statistics of a data frame according to a group covariate or not, can export the results
desc(
data,
vars,
group = NULL,
whole = TRUE,
vars.labels = vars,
group.labels = NULL,
type.quanti = "mean",
test.quanti = "param",
test = TRUE,
noquote = TRUE,
justify = TRUE,
digits = 2,
file.export = NULL,
language = "english"
)
data |
data frame to describe in which we can find |
vars |
vector of character strings of the covariates to describe |
group |
character string, statistics created for each levels of this covariate |
whole |
boolean, |
vars.labels |
vector of character string for sweeter names of covariates in the output |
group.labels |
vector of character string for sweeter column names |
type.quanti |
character string, |
test.quanti |
character string, |
test |
boolean, |
noquote |
boolean, |
justify |
boolean, |
digits |
number of digits of the statistics (mean, sd, median, min, max, Q1, Q3, %), p-values always have 3 digits |
file.export |
character string, name of the XLS file exported |
language |
character string, |
A matrix of the descriptive statistics
Hugo Varet
cgd$steroids=factor(cgd$steroids)
cgd$status=factor(cgd$status)
desc(cgd,vars=c("center","sex","age","height","weight","steroids","status"),group="treat")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.