Nothing
expect_character <- function(object){
act <- quasi_label(rlang::enquo(object), arg = "object")
testthat::expect(
is.character(act$val),
sprintf("%s is of type %s, not 'character'", act$lab, act$val)
)
invisible(act$val)
}
test_that("Psudonomizer works", {
n <- 40
df <- data.frame(
A = sample(LETTERS[1:4], n, T),
B = rnorm(n)
)
.tra <- Pseudonymizer$new()
.tra$transform(df$A)
df$A
expect_character(.tra$transform(df$A))
expect_equal(length(.tra$transform(df$A)), n)
expect_warning(.tra$transform(df$B, parse_numerics=F))
.mut <- .tra$mutate(df, A)
expect_data_frame(.mut)
expect_equal(nrow(.mut), n)
})
Any scripts or data that you put into this service are public.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.