starwars_ %$% table(sex, gender)

and now I have to use the function case_when() to recode the category “none” of sex into “male” if gender is “masculine” and into “female” if gender is “feminine”. Make sure that the categories of sex other than “none” are not converted to NA by specifying the TRUE ~ ... argument. Does anyone know how to do this?