items <- c(A = "a", Z = "z", `.D` = ".d", `_C` = "_C")
.sortDotsUnderscoreFirst(items)
# dots & underscore (using 2nd character), then all lower then all upper
items <- c(B = "Upper", b = "lower", A = "a", `.D` = ".d", `_C` = "_C")
.sortDotsUnderscoreFirst(items)
# with a vector
.sortDotsUnderscoreFirst(c(".C", "_B", "A")) # _B is first
.tagsByClass(character())
a <- 1
.cacheMessage(a, "mean")
a <- 1
.preDigestByClass(a) # returns NULL in the simple case here.
a <- normalizePath(file.path(tempdir(), "test"), mustWork = FALSE)
.checkCacheRepo(a, create = TRUE)
a <- 1
.prepareOutput(a) # does nothing
b <- "NULL"
.prepareOutput(b) # converts to NULL
if (requireNamespace("terra", quietly = TRUE)) {
r <- terra::rast(terra::ext(0, 10, 0, 10), vals = 1:100)
# write to disk manually -- will be in tempdir()
r <- terra::writeRaster(r, file = tempfile(fileext = ".tif"))
# copy it to the cache repository
r <- .prepareOutput(r, tempdir())
}
a <- 1
.addChangedAttr(a) # does nothing because default method is just a pass through
Run the code above in your browser using DataLab