lundi 28 décembre 2020

R: Imputing NAs with random choice of female or male

I am working in R.

I have a data frame column with female or male and some NAs.

Now, I want to randomly assign female or male to the NA values in this column. I do not want to have all NAs be male or female but every NA randomly assigned either or.

How do I do that?

Best, corkinabottle




Aucun commentaire:

Enregistrer un commentaire