Debian Codegraph @

tests/utils/print.R

raw
1 ## print "NAs" as in R >= 4.6.0 to match reference output
2 if (getRversion() < "4.6.0") {
3 print <- function (x) {
4 if (inherits(x, "summary.Spatial") && !is.null(x$data))
5 x$data <- sub("NA's", "NAs ", x$data, fixed = TRUE)
6 else if (is.table(x) && is.character(x))
7 x <- sub("NA's", "NAs ", x, fixed = TRUE)
8 base::print(x)
9 }
10 }