R/getos.R

Defines functions .getOs

.getOs <- 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)
}

Try the fsdaR package in your browser

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

fsdaR documentation built on March 31, 2023, 8:18 p.m.