library(dplyr)
Attaching package: 'dplyr'
The following objects are masked from 'package:stats':
filter, lag
The following objects are masked from 'package:base':
intersect, setdiff, setequal, union
<- datos_crudos |>
my_data transmute(
salario = PP08D1,
sexo = CH04,
nivel_educativo = NIVEL_ED,
edad = CH06
|>
) mutate(salario = ifelse(salario<0,NA,salario)) |>
mutate(sexo = ifelse(sexo == 1, "Hombre","Mujer"))