Skip to content
Mark Mikofski edited this page Apr 16, 2018 · 1 revision

These features are still newish, so caveat emptor:

  1. Install the “Rtools” components for R
(py36r)> conda install m2w64-toolchain m2-make r-devtools m2-sed m2-zip m2-gzip m2-tar m2-texinfo m2-coreutils
  1. Create a folder called tmp in your R conda environment’s “Library” folder
(py36r)> mkdir %LOCALAPPDATA%\Continuum\anaconda3\envs\py36r\Library\tmp
  1. Use R from the Anaconda prompt or start Rstudio in from the start menu

  2. Try to install r packages by searching anaconda first, but you can also install them from CRAN or from source

    • Using conda

      (py36r)> conda search ggplot
      Fetching package metadata .............
      r-ggplot2                    2.1.0                  r3.2.4_0  defaults
                                   2.1.0                  r3.3.0_0  defaults
                                   2.1.0                  r3.3.1_0  defaults
                                   2.2.0                  r3.3.1_0  defaults
                                   2.2.0                  r3.3.2_0  defaults
                                   2.2.1                  r3.4.1_0  defaults
                                *  2.2.1            r342h574d846_0  defaults
      (py36r)> conda install r-ggplot2
      
    • Using CRAN or local repo

      (py36r)> R
      R version 3.4.2 (2017-09-28) -- "Short Summer"
      Copyright (C) 2017 The R Foundation for Statistical Computing
      Platform: x86_64-w64-mingw32/x64 (64-bit)
      > install.packages("ggplot2")
      Warning message:
      package 'ggplot2' is not available (for R version 3.4.2)
      
    • using source

      (py36r)> curl -Ok https://cran.r-project.org/src/contrib/ggplot2_2.2.1.tar.gz
      (py36r)> R
      R version 3.4.2 (2017-09-28) -- "Short Summer"
      Copyright (C) 2017 The R Foundation for Statistical Computing
      Platform: x86_64-w64-mingw32/x64 (64-bit)
      > install.packages("ggplot2_2.2.1.tar.gz", repos=NULL, type="source")
      
Clone this wiki locally