This commit is contained in:
Martin Chan 2021-07-05 14:25:15 +01:00
Родитель 48cea99b83
Коммит d7edb406b4
3 изменённых файлов: 11 добавлений и 4 удалений

Просмотреть файл

@ -26,12 +26,12 @@
#' rep <- c("Manager+", "Manager", "IC")
#' unique(anonymise(sq_data$Layer), replacement = rep)
#'
#' @seealso jitter
#' @export
anonymise <- function(x,
scramble = FALSE,
replacement = NULL,
jitter = NULL){
replacement = NULL){
n_to_rep <- length(x)
v_to_rep <- unique(x)
@ -87,6 +87,7 @@ anonymize <- anonymise
#' )
#' )
#'
#' @seealso anonymise
#' @export
jitter_metrics <- function(data, cols = NULL, ...){

Просмотреть файл

@ -5,9 +5,9 @@
\alias{anonymize}
\title{Anonymise a categorical variable by replacing values}
\usage{
anonymise(x, scramble = FALSE, replacement = NULL, jitter = NULL)
anonymise(x, scramble = FALSE, replacement = NULL)
anonymize(x, scramble = FALSE, replacement = NULL, jitter = NULL)
anonymize(x, scramble = FALSE, replacement = NULL)
}
\arguments{
\item{x}{Character vector to be passed through.}
@ -34,3 +34,6 @@ rep <- c("Manager+", "Manager", "IC")
unique(anonymise(sq_data$Layer), replacement = rep)
}
\seealso{
jitter
}

Просмотреть файл

@ -29,3 +29,6 @@ head(
)
}
\seealso{
anonymise
}