calcularResumenVariablesContinuas | R Documentation |
calcularResumenVariablesContinuas
gives the main statistical summary for continuous variables (mean, standard deviation, coefficient of variation, skewness, kurtosis and quantiles). Also builds the frequency table (with classmark, amplitude and density).
calcularResumenVariablesContinuas(data,
statistics = c("mean", "sd", "se(mean)", "IQR",
"quantiles", "cv", "skewness", "kurtosis"),
quantiles = c(0, 0.25, 0.5, 0.75, 1), groups = NULL,
tablaFrecuencia = FALSE, cortes="Sturges", ...)
data |
|
statistics |
any of |
quantiles |
quantiles to report; by default is |
groups |
optional variable, typically a factor, to be used to partition the data. By default is |
tablaFrecuencia |
logical value indicating whether or not to display the frequency table, by default is |
cortes |
one of:
by default is |
... |
further arguments to be passed to |
calcularResumenVariablesContinuas
performs a descriptive analysis of continuous variables (quantitative variables that take infinite distinct values into an interval), generating a table of statistics (arithmetic mean, standard deviation, interquartile range, coefficient of variation, skewness, kurtosis, and quantiles) optionally allowing the partition of the data by a factor variable (groups
).
It also allows to show the frequency table of selected continuous variables by selecting tablaFrecuencia=TRUE
. Moreover it also allows to divide the range of the variables into intervals given by the argument cortes
(breaks). See more info in cut
and in hist
.
calcularResumenVariablesContinuas
returns a list of two elements:
.numsummary |
an object of class |
.table |
a matrix containing the values of the frequency table. |
numSummary
, cut
, hist
## Not run:
data(cars93)
calcularResumenVariablesContinuas(data=cars93["FuelCapacity"],group=NULL)
calcularResumenVariablesContinuas(data=cars93["FuelCapacity"],group=cars93$Airbags)
bb <- calcularResumenVariablesContinuas(data=cars93["FuelCapacity"],group=cars93$Airbags,
tablaFrecuencia=TRUE)
str(bb)
bb
bb$.summary
class(bb$.summary)
calcularResumenVariablesContinuas(data=cars93["MidPrice"], tablaFrecuencia=TRUE)
calcularResumenVariablesContinuas(data=cars93["MidPrice"], tablaFrecuencia=TRUE, cortes=5)
calcularResumenVariablesContinuas(data=cars93["MidPrice"], tablaFrecuencia=TRUE,
cortes=c(7,14,21,28,63))
calcularResumenVariablesContinuas(data=cars93["MidPrice"], tablaFrecuencia=TRUE,
cortes="Scott")
calcularResumenVariablesContinuas(data=cars93["MidPrice"], groups=cars93$Airbags,
tablaFrecuencia=TRUE, cortes=5)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.