powered by
Anonymizing a data frame by avoiding vulnerability to a rainbow table attack.
anonymous(data, ID, string_length = 15, SEED = NULL)
data.frame. A dataset with the a variable to change its values.
character. A string with the variable name to change its values.
numeric. It defines the string length of the new identification variable.
to be passed to set.seed to keep the the same new id's.
set.seed
anonymous function returns a list with two data frames:
anonymous
original data with the new variable
data frame with the original variable and the new one
anonymouspopstudy
# NOT RUN { library(dplyr) df <- select(mutate(mtcars, id=rownames(mtcars)), id, !contains("id")) anonymous(df, ID="id", string_length = 5, SEED=160589) # }
Run the code above in your browser using DataLab