Garrett Graham
171128
Why use an IDE?
(Integrated Development Environment)
Why use an IDE?
Well, you don't need to…
You can use R directly from the command line, it's just much more work
Using the RStudio IDE (and most other IDEs), you can easily track objects in your environment
Using the RStudio IDE (and most other IDEs), you can easily track objects in your environment. Creating a variable in the local environment
creates a corresponding entry in the “Environment” pane of the IDE
RStudio also provides a convenient editor for R scripts and R Markdown
I'll strongly recommend that you use RMarkdown and the project environments in RStudio
This will help you to
The exam will include the creation of a RMarkdown document that is syntactically correct
RMarkdown is a format that makes it convenient to annotate code as you write
It's good practice to format code into blocks by function
RMarkdown is a format that makes it convenient to annotate code as you write
It's good practice to format code into blocks by function
This is an example of a code block that loads the “tidyverse”, “wesanderson”, and “limma” packages
[1] "http://bioconductor.org"
R packages provide functionality around a specific purpose
The “readr” package has functions associated with reading in text files
Bioconductor is a central package repository for bio-associated R packages
Standard R packages from the nearest R package maintainer can be installed with the “install.packages()” command
install.packages('wesanderson')
Similarly, Bioconductor R packages can be installed with the “biocLite()” command
source('http://bioconductor.org/biocLite.R')
biocLite('limma')
If you came across a package you were interested in, say a set of functions written to visualize pathways:
And you saw that the software was written in R and distributed via Bioconductor:
Either by following the link in the article text or by searching in Bioconductor:
You could then install the package locally using the “biocLite()” command
source('http://bioconductor.org/biocLite.R')
biocLite('pathview')
Now you can use the commands in the “pathview” package
library(pathview)
data("gse16873.d")
pathview(gene.data = gse16873.d[, 1],
pathway.id = "04110",
species = "hsa")