R/get_os.R

Defines functions get_os

Documented in get_os

#' What operating system are we on?
#' @return character naming the OS
get_os <- function(){
    sysinf <- Sys.info()
        if (!is.null(sysinf)){
            os <- sysinf['sysname']
            if (os == 'Darwin')
                os <- "osx"
        } else { ## mystery machine
            os <- .Platform$OS.type
            if (grepl("^darwin", R.version$os))
      os <- "osx"
    if (grepl("linux-gnu", R.version$os))
      os <- "linux"
  }
  tolower(os)
}
bbcuffer/rcutils documentation built on Nov. 10, 2023, 12:08 p.m.