Nothing
#' Factor generator
#'
#' A generator for factor vectors.
#'
#' @template len
#' @template any_na
#'
#' @examples
#' factor_() %>% show_example()
#' factor_(len = 10L, any_na = TRUE) %>% show_example()
#' @template generator
#' @export
factor_ <- function(len = c(1L, 10L), any_na = FALSE) {
qc_gen(function(len2 = len)
character_(len = 1L) %>%
as_hedgehog() %>%
hedgehog::gen.with(as.factor) %>%
replace_some_with(NA_integer_, any_na) %>%
vectorize(len2)
)
}
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.