calcularResumenVariablesDiscretas | R Documentation |
calcularResumenVariablesDiscretas
gives the main statistical summary for discrete variables (mean, standard deviation, coefficient of variation, skewness, kurtosis and quantiles). Also builds the frequency table
calcularResumenVariablesDiscretas(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=NULL)
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 |
calcularResumenVariablesDiscretas
performs a descriptive analysis of discrete variables (quantitative variables that take as a finite or infinite numerable distinct values), 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 discrete 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
.
calcularResumenVariablesDiscretas
returns a list of two elements:
.numsummary |
an object of class |
.table |
a matrix containing the values of the frequency table. |
cut
, hist
## Not run:
data(cars93)
calcularResumenVariablesDiscretas(data=cars93["Cylinders"],group=NULL)
calcularResumenVariablesDiscretas(data=cars93["Cylinders"],group=cars93$Airbags)
bb <- calcularResumenVariablesDiscretas(data=cars93["Cylinders"],group=cars93$Airbags,
tablaFrecuencia=TRUE)
str(bb)
bb
bb$.summary
class(bb$.summary)
calcularResumenVariablesDiscretas(data=cars93["Horsepower"], tablaFrecuencia=TRUE)
calcularResumenVariablesDiscretas(data=cars93["Horsepower"], tablaFrecuencia=TRUE, cortes=5)
calcularResumenVariablesDiscretas(data=cars93["Horsepower"], tablaFrecuencia=TRUE,
cortes=c(50,100,200,250,300))
calcularResumenVariablesDiscretas(data=cars93["Horsepower"], tablaFrecuencia=TRUE,
cortes="Sturges")
calcularResumenVariablesDiscretas(data=cars93["Horsepower"], 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.