R/built.R

Defines functions idesc_get_built

idesc_get_built <- function(self, private) {
  built <- unname(self$get("Built"))
  if (is.na(built)) stop("No ", sQuote('Built'), " field found")
  built <- as.list(strsplit(built, "; ")[[1L]])
  if (length(built) != 4L) {
    stop(sQuote('Built'), " field is corrupted")
  }
  names(built) <- c("R", "Platform", "Date", "OStype")
  built[["R"]] <- R_system_version(sub("^R ([0-9.]+)", "\\1", built[["R"]]))
  built
}
metacran/desc documentation built on Jan. 16, 2024, 4:31 a.m.