mirror of
https://github.com/agdamsbo/REDCapCAST.git
synced 2025-01-19 05:21:56 +01:00
suppressing warnings in test
This commit is contained in:
parent
87505daeeb
commit
21f7b0cb83
@ -46,6 +46,8 @@ as_factor.logical <- function(x, ...) {
|
|||||||
set_attr(x, labels, overwrite = FALSE)
|
set_attr(x, labels, overwrite = FALSE)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#' @rdname as_factor
|
#' @rdname as_factor
|
||||||
#' @export
|
#' @export
|
||||||
as_factor.numeric <- function(x, ...) {
|
as_factor.numeric <- function(x, ...) {
|
||||||
@ -298,11 +300,11 @@ named_levels <- function(data, label = "labels", na.label = NULL, na.value = 99)
|
|||||||
#' sample(c(TRUE, FALSE), 10, TRUE) |> possibly_roman()
|
#' sample(c(TRUE, FALSE), 10, TRUE) |> possibly_roman()
|
||||||
#' rep(NA, 10) |> possibly_roman()
|
#' rep(NA, 10) |> possibly_roman()
|
||||||
possibly_roman <- function(data) {
|
possibly_roman <- function(data) {
|
||||||
# browser()
|
|
||||||
if (all(is.na(data))) {
|
if (all(is.na(data))) {
|
||||||
return(FALSE)
|
return(FALSE)
|
||||||
}
|
}
|
||||||
identical(as.character(data), as.character(utils::as.roman(data)))
|
identical(as.character(data),
|
||||||
|
as.character(suppressWarnings(utils::as.roman(data))))
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user