Hi everybody! This is an RMarkdown document. You can do italics and bold, and include a link
values <-rnorm(5)
values
We can also use echo to show or not show the code and results to show or not show the output.
Unordered List:
first item
second item
Ordered lists:
first
second
We can insert an image like this:
we can add citations1
We can use math mode \(\alpha \beta\) and so on.
Finally we can make nice tables.
penguins_sm <- head(penguins)
kable(penguins_sm)
species | island | bill_length_mm | bill_depth_mm | flipper_length_mm | body_mass_g | sex | year |
---|---|---|---|---|---|---|---|
Adelie | Torgersen | 39.1 | 18.7 | 181 | 3750 | male | 2007 |
Adelie | Torgersen | 39.5 | 17.4 | 186 | 3800 | female | 2007 |
Adelie | Torgersen | 40.3 | 18.0 | 195 | 3250 | female | 2007 |
Adelie | Torgersen | NA | NA | NA | NA | NA | 2007 |
Adelie | Torgersen | 36.7 | 19.3 | 193 | 3450 | female | 2007 |
Adelie | Torgersen | 39.3 | 20.6 | 190 | 3650 | male | 2007 |
#load package and data
library(ggplot2)
data(mpg, package="ggplot2")#mpg <-read.csv("http://goo.gl/uEeRGu")
# scatterplot
theme_set(theme_bw()) #pre-set the bw theme
g <-ggplot(mpg,aes(cty,hwy))
g + geom_jitter(width = .5, size=1) +
labs(subtitle ="mpg: city vs highway mileage",
y="hwy",
x="cty",
title= "Jittered points")
footnotes↩︎