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:
ggplot(diamonds,aes(carat))+geom_histogram(binwidth = 0.1)You can also embed plots, for example:
Note that the echo = FALSE parameter was added to the code chunk to prevent printing of the R code that generated the plot.
ggplot(diamonds,aes(color))+geom_bar()diamonds %>%
arrange(desc(carat))%>%
head(100)%>%
select(carat,cut,color,price) # DT::datatable()# A tibble: 100 x 4
carat cut color price
<dbl> <ord> <ord> <int>
1 5.01 Fair J 18018
2 4.50 Fair J 18531
3 4.13 Fair H 17329
4 4.01 Premium I 15223
5 4.01 Premium J 15223
6 4.00 Very Good I 15984
7 3.67 Premium I 16193
8 3.65 Fair H 11668
9 3.51 Premium J 18701
10 3.50 Ideal H 12587
# ... with 90 more rows