Description Usage Arguments Value Examples
View source: R/mask_sensitive_variable.R
replace_firstname
replaces the firstname in dataset
with firstname from
another database (see firstname_uk
and firstname_us
)
in case they are too sensitive.
1 2 3 4 5 6 7 | replace_firstname(
dataset,
country = "uk",
age_dependency = TRUE,
gender_dependency = TRUE,
race_dependency = FALSE
)
|
dataset |
A data frame of the dataset. |
country |
A string variable with a default of 'uk'. It is either 'uk' or 'us'. |
age_dependency |
A logical variable with a default of TRUE. |
gender_dependency |
A logical variable with a default of TRUE. |
race_dependency |
A logical variable with a default of FALSE. |
A data frame of the dataset
with the firstname column being replaced
by another firstname database.
1 2 3 4 | df <- data.frame(sex=sample(c('male', 'female'), 30, replace = TRUE))
df <- add_variable(df, "nhsid")
df <- add_variable(df, "firstname", country = "uk", gender_dependency= TRUE, age_dependency = FALSE)
replace_firstname(df, country = 'us', age_dependency = FALSE)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.