A suggestion to Windows-based users of R: It may be time to relocate

By | June 17, 2014

Do you remember the time when you switched from graphical statistical software to R? I did it eight years ago, and I had hard time doing even a simple regression analysis without constantly searching for help, it was a pain. In desperation I frequently cheated and went back to Statistica for the familiar window-ish feeling. But my skills developed, and with my first 'for loop' came the first euphoria, it was liberating. I no longer had to follow the predefined structures, I could juggle with my data, explore, play, create.

I think that this is the kind of experience that many R users had at some point.

A couple of years ago I started to notice that some R users (including myself) got so proficient and comfortable with R that they started to do almost everything in it, from file manipulations, to web downloads, complex analyses, graphics editing, presentations and report writing. It's as if R is another operating system running on top of Windows, but it's more useful – unlike Windows, everything has a common structure, it's free, open, and everything can be used as a building part of something else. All work can be scripted and revoked any time, and there is the huge R community constantly working on a vast selection of R packages.

Now here is a secret: There is a real operating system that was here long before R, and it has all of the properties above that make R so awesome. In fact, R sort of copycats the structure of it, and adopts some of its syntax. Imagine that you get the same empowering feeling that R gives, but now you get it from the operating system itself, and from all of the software that you have on it: everything is a package, everything is free, well documented, open, and 'scriptable'.

I believe that if you are comfortable with R and it liberates you, and yet you still dwell in Windows, then it's likely that you will be liberated by the operating system that I have in mind. And after the obligatory bumpy start, you will look back at Windows with the same sentiment as you, the R user, look back at the graphical statistical software. And you will wonder: Bloody hell, I used to use THAT?

The system that I have in mind is GNU/Linux. It goes really nicely with R.

6 thoughts on “A suggestion to Windows-based users of R: It may be time to relocate

  1. Owe

    If only I should be so lucky as having the opportunity to switch to linux - working in the corpoeprate world, Windows and Excel are the common denominator. But switching between R on Linux and R on Windows is a hell thanks to different encodings.

    Reply
    1. Tim Hagmann

      I also work in the corporate world and often have to switch between Linux and Windows. You're right that the different encodings can be a problem. However, if you keep in mind that you code for both enviroments it's possible to mitigate the issue. A way to do that is e.g. to check in your initiation script on what OS you're running:

      command: .Platform$OS.type
      the output is either: "windows" or "unix"

      Depending on the output you can switch between appropriate rules.

      Reply
  2. Charles

    Hi,

    I'm using R regularly but not using intensively enough to do file manipulations, web downloads etc with it.
    Do you think I still have any real reason to switch from Windows to Linux? I'm considering it but I'm unable to convince myself to do it.

    Reply
  3. Christian

    I have to disagree - the reason most oy my scripts are written in R is, that they are reproducible at will. Doing file downloads etc. in windows would involve different scripts or manual labor - which I try to avoid. But it is certainly possible, just take a look at cmd or powershell.
    The same problem applies to linix: sure I could write some of the scripts in bash, but what is the benefit of that?
    On the other hand, Windows has a lot of benefits I enjoy: good graphic tooling, especially Excel / Powerpoint etc. No need to use the command line - in circumstances where I am unfamiliar with a tool or don't need to reproduce the steps pointing and clcking is plain faster. And lastly, it 'just works' - I tried the Linux / openoffice combination as a student, but now I hve tok work with my PC. Constantly fiddling with updates or hardware is not what I am paid for nor what I enjoy.

    Reply
  4. Phillip Burger

    Having the command line is enough of a reason to make the switch.

    If your corporation is all Windows, buy a Linux box for use as a personal workstation at home. Use Github and Dropbox.

    Computing environments in most places are heterogeneous. When you go to find the next job, you'll have some chops on the platform they use.

    Reply
  5. Tim Assal

    Thanks for the post Petr. I can tap into a Linux OS through a virtual machine and I've thought about running R on that. However, I felt a little overwhelmed by making the switch. Is there any documentation that you found helpful in making the transition?

    Reply

Leave a Reply

Your email address will not be published. Required fields are marked *