You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

9 lines
329 B

3 months ago
  1. is_windows <- function() .Platform$OS.type == "windows"
  2. is_mac <- function() Sys.info()[["sysname"]] == "Darwin"
  3. is_linux <- function() Sys.info()[["sysname"]] == "Linux"
  4. platform <- function() {
  5. if (is_windows()) return("win")
  6. if (is_mac()) return("mac")
  7. if (is_linux()) return("linux")
  8. stop("unknown platform")
  9. }