Warning! Certain R packages may run not on Windows with as RCPP may be dependency. Would like a complete list?
As I am new to R using a mixed environment of Windows and Linux like Ubuntu or CentOS, I am finding certain R packages will not install properly on Windows. As I I really like RStudio because of its simplicity to install R packages, I get some strange messages of certain packages that do not load properly due to the so-called current version of R cannot be installed. I am using 2.1.5 but may have found a solution.
What is the solution?
That same R package that gives you install problems on Windows may actually work within an Linux environment. As a result, it could be the R package maybe the result of using RCpp as a dependency. I have even seen certain R packages get built or compiled during the install process. It seems RCpp is used which needs a local version of GCC to build. GCC is a GNU C/C++ compiler for Linux or Unix. As a result, if you are using Windows, you will most likely not have GCC installed on your Windows desktop.
What to do?
You really have two choices:
- Build a Linux virtual machine on a virtualization environment appliance like VMWare or free Oracle Sun Virtual Box. If you go for Virtual Box, everything is free. Nice! There is lots of opening YouTube videos on how to do this so I won’t go there. Also, don’t forget to install your GCC with an ‘appt-get install gcc’ or ‘yum install gcc’ depending your Linux flavor. Again, you can easily find loads of YouTube videos on how to do this.
- Your other choice is something I am not a fan of but nevertheless you should know about. If you are not a fan of Linux, you can always load MINGW onto Windows and then separately install GCC. Again, I have verified there are so many YouTube videos showing how to do this.
I know this could be a pain for some but this is why I really like RStudio which makes my R experience so much better.
I am also looking for anyone who has experienced any R packages that need to be locally compiled with GCC, can you please leave a comment on your experience and which R package? It makes everyone’s life so much easier if can be compiled into one area.
Thanks for that!
P.S. You may want to know about our upcoming presentations in R topics at my R/Matlab Meetup for Financial specialists!