# calcular_frecuencia: Frequency distributions for qualitative variables In RcmdrPlugin.TeachStat: R Commander Plugin for Teaching Statistical Methods

 calcular_frecuencia R Documentation

## Frequency distributions for qualitative variables

### Description

Performs the frequency distribution for qualitative variables, nominals and/or ordinals. For ordinal variables requested quantile is calculated.

### Usage

```calcular_frecuencia(df.nominal, ordenado.frec = FALSE,df.ordinal,
cuantil.p = 0.5,iprint = TRUE, ...)
```

### Arguments

 `df.nominal` `data.frame` with factor type components (including character type) that are interpreted as nominal variables. `ordenado.frec` table ordered frequencies depending on their frequency (only used for nominal variables). `df.ordinal` `data.frame` with factor type components (including character type) that are interpreted as ordinal variables. `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.

### Value

`calcular_frecuencia` returns a list of three elements:

 `.nominal` a matrix containing the table of frequency distribution for nominal variables (`ni` = absolute frequencies and `fi` = relative frequencies). `.ordinal` a matrix containing the table of frequency distribution for ordinal variables (`ni` = absolute frequencies, `fi` = relative frequencies, `Ni` = absolute cumulative frequency, `Fi` = cumulative absolute frequencies). `df.cuantil` data frame containing the quantiles.

`table` , `cumsum`

### Examples

```data(cars93)