R Markdown

This is an practice R Markdown document. Markdown is a simple formatting syntax for authoring HTML, PDF, and MS Word documents. We will use it to make interesting graphs.

When we click the Knit button a document will be generated that includes both content as well as the output of any embedded R code chunks within the document. You can embed an R code chunk like this:

library(ggplot2)
library(viridis)
## Loading required package: viridisLite

Including Plots

#You can also embed plots, for example:

Virdis colors

image(volcano,col = viridis(200))

Magma colors

image(volcano, col = viridis(200, option = 'A')) # a fig.cap is useful
 Mount Rainier volcano 1984

Mount Rainier volcano 1984

##Note that the echo = FALSE parameter could be added to the code chunk to prevent printing of the R code that generated the plot. Thus write a clean notebook.

More colors

colorFunc <- "heat.colors"
# colorFunc <- "terrain.colors"
# colorFunc <- "topo.colors"
# colorFunc <- "cm.colors
# colorFunc <- "rainbow"

r colorFunc

 Mount Rainier volcano 1984

Mount Rainier volcano 1984

# colorFunc <- "heat.colors"
colorFunc <- "terrain.colors"
# colorFunc <- "topo.colors"
# colorFunc <- "cm.colors
# colorFunc <- "rainbow"

r colorFunc

 Mount Rainier volcano 1984

Mount Rainier volcano 1984

#colorFunc <- "heat.colors"
# colorFunc <- "terrain.colors"
colorFunc <- "topo.colors"
# colorFunc <- "cm.colors
# colorFunc <- "rainbow"

r colorFunc

 Mount Rainier volcano 1984

Mount Rainier volcano 1984

#colorFunc <- "heat.colors"
# colorFunc <- "terrain.colors"
# colorFunc <- "topo.colors"
colorFunc <- "cm.colors"
# colorFunc <- "rainbow"

r colorFunc

 Mount Rainier volcano 1984

Mount Rainier volcano 1984

#colorFunc <- "heat.colors"
# colorFunc <- "terrain.colors"
# colorFunc <- "topo.colors"
# colorFunc <- "cm.colors
colorFunc <- "rainbow"

r colorFunc

 Mount Rainier volcano 1984

Mount Rainier volcano 1984