Learn R Programming

assertive (version 0.2-1)

assert_is_64_bit_os: What OS is running?

Description

Is the operating system in this machine Windows/Unix/Mac based.

Usage

assert_is_64_bit_os()

assert_is_bsd()

assert_is_linux()

assert_is_mac()

assert_is_solaris()

assert_is_unix()

assert_is_windows()

is_64_bit_os()

is_bsd()

is_linux()

is_mac()

is_solaris()

is_unix()

is_windows()

Arguments

Value

  • is_windows returns TRUE if the OS on the current platform is Microsoft windows-based. is_unix returns TRUE if the OS is Unix based (pretty much anything that isn't Windows, including OS X). is_mac, is_linux, is_bsd, is_solaris return TRUE if the OS is Apple OS X, Linux, FreeBSD/NetBSD, or Solaris respectively. is_64_bit_os returns TRUE when the operating system is 64-bit. The assert_* functions return nothing but throw an error if the corresponding is_* functions return FALSE.

References

With the exception of is_windows and is_unix that use .Platform$OS.type, the OS is determined from Sys.info()[["sysname"]], which (not on Windows) is calculated via the OS uname progam. GNU has more information on the return value: https://www.gnu.org/software/libc/manual/html_node/Platform-Type.html and Wikipedia has a nice list of possible values: https://en.wikipedia.org/wiki/Uname#Examples

See Also

.Platform, Sys.info and version.

Examples

Run this code
is_windows()
is_unix()
is_mac()
is_linux()
is_bsd()
is_solaris()
is_64_bit_os()
dont_stop(assert_is_windows())
dont_stop(assert_is_unix())

Run the code above in your browser using DataLab