#' gender
#'
#' @description This function derives the gender of each applicant from the given title
#' @param df The name of the dataframe you want to manipulate
#' @return datatframe, tibble
#' @keywords gender
#' @import dplyr
#' @export
#' @examples tidyGender(df = df)
tidyGender <- function(df) {
df <- df %>%
dplyr::mutate(antragsteller1anrede = fct_recode(antragsteller1anrede,
'männlich' = 'Herr',
'weiblich' = 'Frau'),
antragsteller2anrede = fct_recode(antragsteller2anrede,
'männlich' = 'Herr',
'weiblich' = 'Frau')
) %>%
dplyr::rename(antragsteller1geschlecht = antragsteller1anrede,
antragsteller2geschlecht = antragsteller2anrede)
return(df)
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.