-
Notifications
You must be signed in to change notification settings - Fork 10
/
Copy pathInstallation.Rmd
executable file
·93 lines (67 loc) · 2.57 KB
/
Installation.Rmd
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
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
---
title: "Installation of microbiome R tools"
author: "Leo Lahti, Sudarshan Shetty et al."
bibliography:
- bibliography.bib
output:
BiocStyle::html_document:
number_sections: no
toc: yes
toc_depth: 4
toc_float: true
self_contained: true
thumbnails: true
lightbox: true
gallery: true
use_bookdown: false
highlight: haddock
---
<!--
%\VignetteEngine{knitr::rmarkdown}
%\VignetteIndexEntry{microbiome tutorial - Installation}
%\usepackage[utf8]{inputenc}
%\VignetteEncoding{UTF-8}
-->
## Installing R/RStudio
**If you do not already have R/RStudio installed**, do as follows.
1. Install [R](http://www.r-project.org/)
1. Install [RStudio](http://rstudio.org)
1. With Windows, install also [RTools](http://cran.r-project.org/bin/windows/Rtools/) (version corresponding to your R version)
## Installing microbiome R package
Open R and install the package. If the installation fails, ensure from
the RStudio tools panel that you have access to the Bioconductor
repository.
```{r installation, message=FALSE, warning=FALSE, eval=FALSE}
library(BiocManager)
BiocManager::install("microbiome")
```
Alternatively, to install the bleeding edge (potentially unstable)
development version, run in R:
```{r microbiomeinstall, message=FALSE, warning=FALSE, eval=FALSE}
library(devtools) # Load the devtools package
install_github("microbiome/microbiome") # Install the package
```
## Using the tools
Once the package has been installed, load it in R
```{r loading, eval=TRUE, message=FALSE}
library(microbiome)
```
For a brief overview, see the [package vignette](https://bioconductor.org/packages/devel/bioc/vignettes/microbiome/inst/doc/vignette.html) and the more extensive [on-line tutorial](http://microbiome.github.io/tutorials/).
## Further reading
* [Rmarkdown tips](http://rmarkdown.rstudio.com/)
* [R cheat sheets](http://devcheatsheet.com/tag/r/)
* [Using Github with R and RStudio](http://www.molecularecologist.com/2013/11/using-github-with-r-and-rstudio/)
* [Molecular ecologist's view on code sharing](http://www.molecularecologist.com/2013/08/want-to-share-your-code/)
## General instructions to install R packages
Most R packages are maintained in CRAN, Bioconductor or Github. To
install the package from each, use:
```{r generalinstall, message=FALSE, warning=FALSE, eval=FALSE}
# Installing from Bioconductor
#source("http://www.bioconductor.org/biocLite.R")
BiocManager::install("MASS")
# Installing from CRAN
install.packages("sorvi")
# Installing from Github
library(devtools)
install_github("antagomir/netresponse")
```