-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy pathinstallation.Rmd
More file actions
65 lines (50 loc) · 2.2 KB
/
installation.Rmd
File metadata and controls
65 lines (50 loc) · 2.2 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
---
title: "Installation instructions"
output: rmarkdown::html_vignette
vignette: >
%\VignetteIndexEntry{Installation instructions}
%\VignetteEncoding{UTF-8}
%\VignetteEngine{knitr::rmarkdown}
editor_options:
chunk_output_type: console
---
<!-- github markdown built using
rmarkdown::render("vignettes/installation.Rmd", output_format = rmarkdown::github_document())
-->
## System requirements
This package is supported for Linux, but should also work on Mac OS X and Windows. It has been tested with [Github Actions](https://github.com/dynverse/dyngen/actions?query=workflow%3AR-CMD-check) for R 3.5, 3.6 and 4.0 on the following systems Ubuntu, Windows Server and Mac OS X.
## Step 1: Installing from CRAN or GitHub (Required)
dyngen is available on CRAN, so you can install it with the following command.
```r
install.packages("dyngen")
```
If you would like to install the development version of dyngen from GitHub instead, run the following command. Use at your own risk!
```r
install.packages("remotes")
remotes::install_github("dynverse/dyngen@devel", dependencies = TRUE)
```
## Step 2: Configure host system (Recommended)
It's recommended to let dyngen know where it can cache downloaded files and how many cores the host system has.
If you don't perform these steps, running dyngen simulations will take a lot longer than it needs to.
To do so, start editing your Rprofile by running the following commands:
```r
install.packages("usethis")
usethis::edit_r_profile()
```
Inside your Rprofile, add the following lines:
```r
options(Ncpus = 8L) # change this to the number of cores in your system
options(dyngen_download_cache_dir = R_user_dir("dyngen", "data"))
```
After saving and closing this file, restart your R sesstion.
## Step 3: Download cacheable files (Optional)
dyngen will sometimes download files from GitHub and cache them for later use (if you executed step 2).
After installation, you can already download these files so they will not be downloaded at a later
stage.
```r
library(utils)
library(tools)
zip <- tempfile(fileext = ".zip")
download.file("https://github.com/dynverse/dyngen/archive/data_files.zip", zip)
unzip(zip, exdir = getOption("dyngen_download_cache_dir"), overwrite = TRUE)
```