On a previous post I explained how to install R and Python effortlessy.
Now I bought a Windows machine and this post concentrates a lot of reading and the experiments I made until I configures everything in order to write this blog post. I use Pelican for my blog, so I had to do a few steps I wasn't aware of in Windows.
You'll need Chocolatey installed and administrator access to Windows PowerShell. In this way an important part of path-related issues are solved.
This part is easy. From PowerShell run:
choco install r.project python2
I just downloaded the graphic installers and this part this not need additional configurations.
If you want to build a package, RStudio will warn you that it cannot find Rtools and will ask you to download it. This part is all about clicking "yes" and RStudio will set up everything.
MathJax plugin presents problems with newer Pelican versions, so I'll use Pelican 3.6.3 as in my post for OS X.
Run this from PowerShell:
pip install pelican==3.6.3 markdown
rpy2 you need to edit the system PATH. Go to the Control Panel and add this to the Path:
Then create the following variables:
R_HOME pointing to %ProgramFiles%\R\R-3.4.1 R_LIBS_USER pointing to %userprofile%\documents\R\win-library\3.4 R_USER containing your username
The easiest option to install
rpy2 is to install it using UC Irvine's I got the version for Python 2.7 and then I did run:
pip install C:\Users\pacha\Downloads\rpy2-2.7.8-cp27-none-win_amd64.whl
If all of the above steps went well, you can open RStudio and run this:
# common use packages install.packages(c("tidyverse","data.table","dtplyr","knitr","devtools")) # things I use for lectures/work library(devtools) devtools::install_github("ropenscilabs/skimr") install.packages(c("sjlabelled","np","bbmle","micEcon","HistData","XLConnect"))
And finally I was able to write blog entries without errors or warning on Windows!