Compare commits

..

No commits in common. "053c4447adef85cd393d98f0113eca6ff9e536c1" and "87505daeeba58909c8a9b9fec82ec5ab52fa02bb" have entirely different histories.

2 changed files with 3 additions and 5 deletions

View File

@ -46,8 +46,6 @@ as_factor.logical <- function(x, ...) {
set_attr(x, labels, overwrite = FALSE)
}
#' @rdname as_factor
#' @export
as_factor.numeric <- function(x, ...) {
@ -300,11 +298,11 @@ named_levels <- function(data, label = "labels", na.label = NULL, na.value = 99)
#' sample(c(TRUE, FALSE), 10, TRUE) |> possibly_roman()
#' rep(NA, 10) |> possibly_roman()
possibly_roman <- function(data) {
# browser()
if (all(is.na(data))) {
return(FALSE)
}
identical(as.character(data),
as.character(suppressWarnings(utils::as.roman(data))))
identical(as.character(data), as.character(utils::as.roman(data)))
}

View File

@ -15,7 +15,7 @@ NULL
#' @rdname fct_drop
#' @export
fct_drop.data.frame <- function(x, ...) {
purrr::map(x, \(.x){
purrr::map(\(.x){
if (is.factor(.x)){
forcats::fct_drop(.x)
} else {