R/isWindows.R

Defines functions isMacOSX isWindows

Documented in isMacOSX isWindows

#' Find the operating system
#'
#' Indicate whether we are on Windows or MacOSX.
#'
#' @return Logical scalar indicating whether we are on the specified OS.
#'
#' @author Aaron Lun
#'
#' @examples
#' isWindows()
#' isMacOSX()
#' @export
isWindows <- function() {
    .Platform$OS.type=="windows" 
}

#' @export
#' @rdname isWindows
isMacOSX <- function() {
    Sys.info()[["sysname"]] == "Darwin"
}

Try the basilisk.utils package in your browser

Any scripts or data that you put into this service are public.

basilisk.utils documentation built on Jan. 29, 2021, 2 a.m.