R Markdown

This is an R Markdown document. Markdown is a simple formatting syntax for authoring HTML, PDF, and MS Word documents. For more details on using R Markdown see http://rmarkdown.rstudio.com.

When you 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:

## 
## Attaching package: 'dplyr'
## The following objects are masked from 'package:stats':
## 
##     filter, lag
## The following objects are masked from 'package:base':
## 
##     intersect, setdiff, setequal, union
## 
## Attaching package: 'kableExtra'
## The following object is masked from 'package:dplyr':
## 
##     group_rows

Including Plots

You can also embed plots, for example:

## # A tibble: 87 x 2
##    App.Possible.Acad.Major     n
##    <chr>                   <int>
##  1 Undeclared               3629
##  2 Nursing                  2169
##  3 General Management       1937
##  4 Biology                  1618
##  5 Psychology               1310
##  6 English                   907
##  7 Health Sciences           907
##  8 Criminology               838
##  9 Computer Science          798
## 10 Mechanical Engineering    721
## # ... with 77 more rows

install.packages(“viridis”) library(viridis) viridis_pal(option = “D”)(n) # n = number of colors seeked

## Loading required package: viridisLite

m <- leaflet() %>% addTiles() %>% setView(-71.0382679, 42.3489054, zoom = 18) m # the RStudio ‘headquarter’ m %>% fitBounds(-72, 40, -70, 43)

Note that the echo = FALSE parameter was added to the code chunk to prevent printing of the R code that generated the plot.