ANTH630 Home
Intro
With R Markdown you can typeset documents and code snippets. Organizing your problem sets into R Notebooks can be a clear way to present your process and results. This tutorial will help you get started. Download this code sourcefile to see how this document is made.
Headings
Basic formatting is done following markdown conventions.
# Heading 1
Heading 1
## Heading 2
Heading 2
### Heading 3
Heading 3
##### Heading 4
Heading 4
You can also add inset boxes and other blocks. Insets are added with > text
. Boxes are added around blocks of text that are tabbed twice.
Inset
Box
Text Style
You can also adjust text style.
**bold**
bold
*italic*
italic
Lists
There are several ways to add lists. They can be customized with bullets, numbers, and nesting.
- list item
- list item
* list item
+ nested list item
* list item
1. list item
2. list item
3. list item
- list item
- list item
- list item
R code chunks
R code chunks are initiated with ```{r}
and ended with ```
. Any code in between these strings will be executed as normal R code.
mean(2,5,7,3,8,8,8,4,2)
[1] 2
library(ggplot2)
ggplot(cars, aes(speed,dist)) + geom_point(color="red", size=3)

Star wars character counts
Aleena |
1 |
Besalisk |
1 |
Cerean |
1 |
Chagrian |
1 |
Clawdite |
1 |
Dug |
1 |
Ewok |
1 |
Geonosian |
1 |
Hutt |
1 |
Iktotchi |
1 |
Kaleesh |
1 |
Kel Dor |
1 |
Mon Calamari |
1 |
Muun |
1 |
Nautolan |
1 |
Neimodian |
1 |
Pau’an |
1 |
Quermian |
1 |
Rodian |
1 |
Skakoan |
1 |
Sullustan |
1 |
Tholothian |
1 |
Togruta |
1 |
Toong |
1 |
Toydarian |
1 |
Trandoshan |
1 |
Vulptereen |
1 |
Xexto |
1 |
Yoda’s species |
1 |
Kaminoan |
2 |
Mirialan |
2 |
Twi’lek |
2 |
Wookiee |
2 |
Zabrak |
2 |
Gungan |
3 |
NA |
4 |
Droid |
6 |
Human |
35 |
Next steps
There are numerous themes that can be applied to R Markdown documents. Themes (also these) vary depending on the specific type of markdown document.
In addition to R notebooks, markdown can also be used to make slides, websites, books, reports and more. Here is a gallery of R markdown products.
LS0tCnRpdGxlOiAiQU5USDYzMDogR2V0dGluZyBzdGFydGVkIHdpdGggUiBNYXJrZG93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