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.
To work effectively with R packages one needs to install R, complilers, git, and Latex documentation support.
To install:
gitbash
..msi
file from https://github.com/jgm/pandoc/releases/tag/2.11.0.2 (linked from https://pandoc.org/installing.html#windows).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")
Install RStudio for Windows 10/8/7 from https://rstudio.com/products/rstudio/download/#download.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.