Does R has "THEN DO" option similar to SAS.

I would like to use a 'THEN DO' structure in R, but unfortunately, I haven't been able to find an equivalent option. Is there any way to achieve this? Specifically, I want to derive both ASEX and ASEXN in the same step not with multiple ifelse.

dm_plus <- left_join(dm, suppdm, by = "USUBJID") %>%
mutate(ASEX = ifelse(SEX == "M", "Male",
ifelse(SEX == "F", "Female", NA))),

I have never used SAS, but maybe you could use case_when from the dplyr package:

mutate(ASEX = case_when(
SEX == "M" ~ "Male", 
SEX == "F" ~ "Female", 
TRUE ~ NA))

Thank you for your response, but unfortunately, it doesn't fully address my issue. I would like to derive two different variables within the same 'ifelse' or 'case_when' step.