R/misc_funs.R

Defines functions get_os

#' @export
#'

# Obtains the user's operating system
get_os <- function(){
  sysinf <- Sys.info()
  if (!is.null(sysinf)){
    os <- sysinf['sysname']
    if (os == 'Darwin')
      os <- "osx"
  } else {
    os <- .Platform$OS.type
    if (grepl("^darwin", R.version$os))
      os <- "osx"
    if (grepl("linux-gnu", R.version$os))
      os <- "linux"
  }
  tolower(os)
}
matt-tudball/selectioninterval documentation built on Sept. 4, 2022, 4:08 p.m.