WISE R CLUB, Xiaojun Sun, 2014.06.20
R is a language and environment for statistical computing and graphics. It is widely used around the world. Here I briefly describe the steps to install and upgrade R for R beginners. This post is written for Windows user. If you use Mac, please search Google for instruction. If you have already installed R on your computer, you can jump to step two.
The latest version of R can be download from CRAN. Rstudio Desktop can be download from it’s official site.
You should set up a folder named R
at the directory where you want to install R in. The path should look like G:\Program Files\R\R-3.1.0
which is shown in the graph below.
Choose according to you PC operation system.
If you install it successfully, you open R and will see this:
Choose directory to install Rstudio.
Open Rstudio you will see this.
Now we set up the global library for R. More details about this is described in Tal Galili’s blog post. Although you are using the latest version of R, you can still follow my steps. It will help you set a global library for R. This will prevent some troubles in the future.
Open your R. Run chooseCRANmirror()
command line(Type it and hit ENTER
) .Choose China(Xiamen)
.
Run the following codes line by line.
source("http://www.r-statistics.com/wp-content/uploads/2010/04/upgrading-R-on-windows.r.txt") Old.R.RunMe()
It will ask you whether or not to quit R. Just type n
and hit ENTER
. Then run New.R.RunMe()
just the same way.
Once you have done these, from now on, whenever you want to update to a new version of R in the future, all you will need to do are the following TWO steps:
source("http://www.r-statistics.com/wp-content/uploads/2010/04/upgrading-R-on-windows.r.txt") New.R.RunMe()
That’s all. I hope it helps. Thank you! O(∩_∩)O
WISE R Club project is proudly maintained by XiaojunSun.