extras/setting_up_a_Windows_machine.md

Our example of how to set up a Linux machine is for Windows 10. This is to prepare for our lesson on building your own R package.

Installing R and support software

To work effectively with R packages one needs to install R, complilers, git, and Latex documentation support.

To install:

Note, for us the Rtools install would hang Microsoft Edge browser (likely at a hidden security prompt). So we suggest using Firefox for the downloads. Also, install full versions of all packages and use 64 bit versions if there is an option. Each machine is going to be a bit different. Paths with spaces in them can cause trouble for R, so try to avoid them. We confirmed these insstall instructions on a clean Windows 10 install on Monday October 19th, 2020.

Use R to install R packages.

Start R
install.packages(c(
   "devtools",   # for working with packages
   "roxygen2",   # to generate manuals from comments
   "wrapr",      # example for argument list checking
   "knitr",      # to generate vignettes from markdown
   "rmarkdown",  # to generate vignettes from markdown
   "R.rsp",      # to pass pre-generated PDF as vignettes
   "git2r",      # for direct in-R git work
   "remotes",    # for installing from GitHub directly
   "tinytest"    # for running tests
   ))
quit(save = 'no')

Back at the bash or zsh bring in our example package.

Start R
git2r::clone(
   url = 'https://github.com/WinVector/ExampleRPackage.git',
   local_path = './ExampleRPackage')

or

From a bash prompt
git clone https://github.com/WinVector/ExampleRPackage.git

Start to work on the package.

Start R
setwd("ExampleRPackage")
devtools::build()
install.packages('~/ExampleRPackage_0.1.0.tar.gz', repos = NULL)
quit(save = 'no')

Start R
library(ExampleRPackage)
setwd("ExampleRPackage")
tinytest::test_package("ExampleRPackage")

(Optional) Installing RStudio

Install RStudio for Windows 10/8/7 from https://rstudio.com/products/rstudio/download/#download.



WinVector/ExampleRPackage documentation built on Dec. 31, 2020, 6:33 p.m.