R markdown proof editing
This commit is contained in:
42
rmarkdown/dashboard.Rmd
Normal file
42
rmarkdown/dashboard.Rmd
Normal file
@@ -0,0 +1,42 @@
|
||||
---
|
||||
title: "Diamonds distribution dashboard"
|
||||
output: flexdashboard::flex_dashboard
|
||||
---
|
||||
|
||||
```{r setup, include = FALSE}
|
||||
library(ggplot2)
|
||||
library(dplyr)
|
||||
knitr::opts_chunk$set(fig.width = 5, fig.asp = 1/3)
|
||||
```
|
||||
|
||||
## Column 1
|
||||
|
||||
### Carat
|
||||
|
||||
```{r}
|
||||
ggplot(diamonds, aes(carat)) + geom_histogram(binwidth = 0.1)
|
||||
```
|
||||
|
||||
### Cut
|
||||
|
||||
```{r}
|
||||
ggplot(diamonds, aes(cut)) + geom_bar()
|
||||
```
|
||||
|
||||
### Colour
|
||||
|
||||
```{r}
|
||||
ggplot(diamonds, aes(color)) + geom_bar()
|
||||
```
|
||||
|
||||
## Column 2
|
||||
|
||||
### The largest diamonds
|
||||
|
||||
```{r}
|
||||
diamonds %>%
|
||||
arrange(desc(carat)) %>%
|
||||
head(100) %>%
|
||||
select(carat, cut, color, price) %>%
|
||||
DT::datatable()
|
||||
```
|
||||
BIN
rmarkdown/diamond-sizes-notebook.png
Normal file
BIN
rmarkdown/diamond-sizes-notebook.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 577 KiB |
BIN
rmarkdown/diamond-sizes-report.png
Normal file
BIN
rmarkdown/diamond-sizes-report.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 830 KiB |
24
rmarkdown/diamond-sizes.Rmd
Normal file
24
rmarkdown/diamond-sizes.Rmd
Normal file
@@ -0,0 +1,24 @@
|
||||
---
|
||||
title: "Diamond sizes"
|
||||
date: 2016-08-25
|
||||
output: html_document
|
||||
---
|
||||
|
||||
```{r setup, include = FALSE}
|
||||
library(ggplot2)
|
||||
library(dplyr)
|
||||
|
||||
smaller <- diamonds %>%
|
||||
filter(carat <= 2.5)
|
||||
```
|
||||
|
||||
We have data about `r nrow(diamonds)` diamonds. Only
|
||||
`r nrow(diamonds) - nrow(smaller)` are larger than
|
||||
2.5 carats. The distribution of the reminder is shown
|
||||
below:
|
||||
|
||||
```{r, echo = FALSE}
|
||||
smaller %>%
|
||||
ggplot(aes(carat)) +
|
||||
geom_freqpoly(binwidth = 0.01)
|
||||
```
|
||||
10
rmarkdown/example-site.yml
Normal file
10
rmarkdown/example-site.yml
Normal file
@@ -0,0 +1,10 @@
|
||||
name: "my-website"
|
||||
navbar:
|
||||
title: "My Website"
|
||||
left:
|
||||
- text: "Home"
|
||||
href: index.html
|
||||
- text: "Viridis Colors"
|
||||
href: 1-example.html
|
||||
- text: "Terrain Colors"
|
||||
href: 3-inline.html
|
||||
21
rmarkdown/fuel-economy.Rmd
Normal file
21
rmarkdown/fuel-economy.Rmd
Normal file
@@ -0,0 +1,21 @@
|
||||
---
|
||||
output: html_document
|
||||
params:
|
||||
my_class: "suv"
|
||||
---
|
||||
|
||||
```{r setup, include = FALSE}
|
||||
library(ggplot2)
|
||||
library(dplyr)
|
||||
|
||||
class <- mpg %>% filter(class == params$my_class)
|
||||
```
|
||||
|
||||
# Fuel economy for `r params$my_class`s
|
||||
|
||||
```{r, message = FALSE}
|
||||
ggplot(class, aes(displ, hwy)) +
|
||||
geom_point() +
|
||||
geom_smooth(se = FALSE)
|
||||
```
|
||||
|
||||
48
rmarkdown/markdown.Rmd
Normal file
48
rmarkdown/markdown.Rmd
Normal file
@@ -0,0 +1,48 @@
|
||||
Text formatting
|
||||
------------------------------------------------------------
|
||||
|
||||
*italic* or _italic_
|
||||
**bold** __bold__
|
||||
`code`
|
||||
superscript^2^ and subscript~2~
|
||||
|
||||
Headings
|
||||
------------------------------------------------------------
|
||||
|
||||
# 1st Level Header
|
||||
|
||||
## 2nd Level Header
|
||||
|
||||
### 3rd Level Header
|
||||
|
||||
Lists
|
||||
------------------------------------------------------------
|
||||
|
||||
* Bulleted list item 1
|
||||
|
||||
* Item 2
|
||||
|
||||
* Item 2a
|
||||
|
||||
* Item 2b
|
||||
|
||||
1. Numbered list item 1
|
||||
|
||||
1. Item 2. The numbers are incremented automatically in the output.
|
||||
|
||||
Links and images
|
||||
------------------------------------------------------------
|
||||
|
||||
<http://example.com>
|
||||
|
||||
[linked phrase](http://example.com)
|
||||
|
||||

|
||||
|
||||
Tables
|
||||
------------------------------------------------------------
|
||||
|
||||
First Header | Second Header
|
||||
------------- | -------------
|
||||
Content Cell | Content Cell
|
||||
Content Cell | Content Cell
|
||||
16
rmarkdown/rmarkdown.Rproj
Normal file
16
rmarkdown/rmarkdown.Rproj
Normal file
@@ -0,0 +1,16 @@
|
||||
Version: 1.0
|
||||
|
||||
RestoreWorkspace: Default
|
||||
SaveWorkspace: Default
|
||||
AlwaysSaveHistory: Default
|
||||
|
||||
EnableCodeIndexing: Yes
|
||||
UseSpacesForTab: Yes
|
||||
NumSpacesForTab: 2
|
||||
Encoding: UTF-8
|
||||
|
||||
RnwWeave: knitr
|
||||
LaTeX: XeLaTeX
|
||||
|
||||
AutoAppendNewline: Yes
|
||||
StripTrailingWhitespace: Yes
|
||||
Reference in New Issue
Block a user