I am organizing data set and have a problem regarding to factor variables. I have a gender variable total count of 3246 and most of them are males. I have 50 NA's in the gender category. I do not want to delete the observations with NA's but also do not want to replace all of it with the 'male' or 'female'. I would like to change randomly 7 of the NA's to 'female' and 43 to 'male'. However, I could not manage it.
I already know how to change NA's to one type.
data$Gender[is.na(data$Gender)] = 'male'