powered by
replace_nhsid replaces the nhsid in dataset with another random nhsid in case they are too sensitive.
replace_nhsid
dataset
replace_nhsid(dataset)
A data frame of the dataset.
A data frame of the dataset with the nhsid column being replaced by random nhsid.
# NOT RUN { df <- data.frame(sex=sample(c('male', 'female'), 100, replace = TRUE)) df$race <- sample(1:6, 100, replace = TRUE) df <- add_variable(df, "nhsid") replace_nhsid(df) # }
Run the code above in your browser using DataLab