View source: R/estadisticadescriptiva.R
calcular_frecuencia | R Documentation |
Performs frequency distribution for qualitative, nominal and/or ordinal variables. For ordinal variables, the requested quantile is calculated.
calcular_frecuencia(df.nominal, ordenado.frec = FALSE,df.ordinal,
cuantil.p = 0.5,iprint = TRUE, ...)
df.nominal |
|
ordenado.frec |
table ordered frequencies depending on their frequency (only used for nominal variables). |
df.ordinal |
|
cuantil.p |
requested quantile value (only used for ordinal variables). |
iprint |
logical value indicating whether or not to display the frequency table. |
... |
further arguments to be passed to or from methods. |
calcular_frecuencia
returns a list of three elements:
.nominal |
a matrix containing the table of frequency distribution for nominal variables ( |
.ordinal |
a matrix containing the table of frequency distribution for ordinal variables ( |
df.cuantil |
data frame containing the quantiles. |
table
, cumsum
data(cars93)
aa <- calcular_frecuencia(df.nominal=cars93["Type"], ordenado.frec=TRUE, df.ordinal=NULL,
cuantil.p=0.5, iprint = TRUE)
calcular_frecuencia(df.nominal=NULL, ordenado.frec=TRUE, df.ordinal=cars93["Airbags"],
cuantil.p=0.25, iprint = TRUE)
bb <- calcular_frecuencia(df.nominal=cars93["Type"], ordenado.frec=TRUE,
df.ordinal=cars93["Airbags"], cuantil.p=0.25, iprint = FALSE)
str(bb)
bb
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.