Unix/linux machine for mac

broken image
broken image

We can also ask about the R that we’re running by looking at the R.version list. Presumably it’s this same value on Unix and Linux where we really would be using X11. Worse, from my command line (Terminal) GUI is “X11″, even though it uses Aqua for the graphics instead. When we’re running inside RStudio this is just “RStudio” and from the R.app that’s bundled with the R distribution it’s “AQUA” on OSX and “Rgui” on Windows. Platform won’t distinguish OSX from a more traditional Unix or Linux machine. To be fair that’s because OSX is built on a base of tweaked BSD Unix. For Windows the OS.type is just “windows”, but confusingly it’s “unix” for Unix, Linux, and my Mac OSX laptop. Operating systems are a platform issue, so let’s start with the constants in the list. Here’s a short account of where you can find this information and a little function to wrap the answer up neatly.

broken image

Sometimes a bit of R code needs to know what operating system it’s running on.