[ RDocumentation ](/)

Moon  [ ](https://github.com/datacamp/rdocumentation-2.0) [ Learn R
](https://www.datacamp.com/learn/r)

Search all packages and functions

[ base  (version  3.6.2  ) ](/packages/base/versions/3.6.2)

#  .Platform: Platform Specific Variables

##  Description

` .Platform ` is a list with some details of the platform under which  R  was
built. This provides means to write OS-portable  R  code.

##  Usage

    
    
    .Platform

##  Arguments

##  Value

A list with at least the following components:

OS.type

    

character string, giving the **O** perating **S** ystem (family) of the
computer. One of ` "unix" ` or ` "windows" ` .

file.sep

    

character string, giving the **file** **sep** arator used on your platform: `
"/" ` on both Unix-alikes _and_ on Windows (but not on the former port to
Classic Mac OS).

dynlib.ext

    

character string, giving the file name **ext** ension of **dyn** amically
loadable **lib** raries, e.g., ` ".dll" ` on Windows and ` ".so" ` or ` ".sl"
` on Unix-alikes. (Note for macOS users: these are shared objects as loaded by
` [ dyn.load ](/link/dyn.load?package=base&version=3.6.2) ` and not dylibs:
see ` [ dyn.load ](/link/dyn.load?package=base&version=3.6.2) ` .)

GUI

    

character string, giving the type of GUI in use, or ` "unknown" ` if no GUI
can be assumed. Possible values are for Unix-alikes the values given via the
-g  command-line flag ( ` "X11" ` , ` "Tk" ` ), ` "AQUA" ` (running under `
R.app ` on macOS), ` "Rgui" ` and ` "RTerm" ` (Windows) and perhaps others
under alternative front-ends or embedded  R  .

endian

    

character string, ` "big" ` or ` "little" ` , giving the ‘endianness’ of the
processor in use. This is relevant when it is necessary to know the order to
read/write bytes of e.g.an integer or double from/to a [ connection
](/link/connection?package=base&version=3.6.2) : see ` [ readBin
](/link/readBin?package=base&version=3.6.2) ` .

pkgType

    

character string, the preferred setting for ` [ options
](/link/options?package=base&version=3.6.2) ("pkgType") ` . Values ` "source"
` , ` "mac.binary.el-capitan" ` and ` "win.binary" ` are currently in use.

This should **not** be used to identify the OS.

path.sep

    

character string, giving the **path** **sep** arator, used on your platform,
e.g., ` ":" ` on Unix-alikes and ` ";" ` on Windows. Used to separate paths in
environment variables such as ` PATH ` and ` TEXINPUTS ` .

r_arch

    

character string, possibly ` "" ` . The name of an architecture-specific
directory used in this build of  R  .

##  AQUA

` .Platform$GUI ` is set to ` "AQUA" ` under the macOS GUI, ` R.app ` . This
has a number of consequences:

  * ` /usr/local/bin ` is _appended_ to the ` PATH ` environment variable. 

  * the default graphics device is set to ` quartz ` . 

  * selects native (rather than Tk) widgets for the ` graphics = TRUE ` options of ` [ menu ](/link/menu?package=base&version=3.6.2) ` and ` [ select.list ](/link/select.list?package=base&version=3.6.2) ` . 

  * HTML help is displayed in the internal browser. 

  * the spreadsheet-like data editor/viewer uses a Quartz version rather than the X11 one. 

##  See Also

` [ R.version ](/link/R.version?package=base&version=3.6.2) ` and ` [ Sys.info
](/link/Sys.info?package=base&version=3.6.2) ` give more details about the OS.
In particular, ` R.version$platform ` is the canonical name of the platform
under which  R  was compiled.

` [ .Machine ](/link/.Machine?package=base&version=3.6.2) ` for details of the
arithmetic used, and ` [ system ](/link/system?package=base&version=3.6.2) `
for invoking platform-specific system commands.

` [ capabilities ](/link/capabilities?package=base&version=3.6.2) ` and ` [
extSoftVersion ](/link/extSoftVersion?package=base&version=3.6.2) ` (and links
there) for availability of capabilities partly _external_ to  R  but used from
R  functions.

##  Examples

[ Run this code
](https://app.datacamp.com/workspace/pr