4.5 Agrupar casos con group_by()

summarise(group_by(empleados, sexo, minoria), sal.med = mean(salario), n = n())
## `summarise()` has grouped output by 'sexo'. You can override using the
## `.groups` argument.
## # A tibble: 4 × 4
## # Groups:   sexo [2]
##   sexo   minoria sal.med     n
##   <fct>  <fct>     <dbl> <int>
## 1 Hombre No       44475.   194
## 2 Hombre S�       32246.    64
## 3 Mujer  No       26707.   176
## 4 Mujer  S�       23062.    40