Template based on Rmarkdown, using the united HTML theme.
Refer to a sub section. Citing an article [@article]. Refer to section [Analysis].
Loading libraries:
library(DT) library(ggplot2) library(xfun)
Vestibulum
imperdiet^[Nullam quis sem nunc], ex vel sodales facilisis, nibh tellus imperdiet massa, sit amet scelerisque orci velit vel tellus. Ut consequat justo tincidunt porttitor varius. Suspendisse erat ipsum, feugiat vitae rhoncus non, molestie ac purus. Morbi aliquet, elit eget blandit suscipit, est lacus facilisis turpis, nec fermentum nunc felis et lorem.
::: {#Table1} A nice table example: :::
DT::datatable(mtcars, options = list(pageLength = 3))
Suspendisse potenti
We can have math formulas inline like this: $E=mc^2$ or make them span an entire line like this:
::: {#eq1} :::
$$f=\frac{a}{b+c}$$
Create a horizontal line using markdown syntax:
Cras pulvinar ligula ac nisi porttitor, volutpat congue orci tincidunt. Pellentesque non mi congue, porta enim eget, venenatis sem. Integer suscipit vulputate tellus, eget commodo dolor gravida vel. Suspendisse gravida gravida ligula, in interdum sapien molestie ut.
::: {.blue-box} In ut vehicula risus. Refer to the table above! :::
options(scipen=999) # turn-off scientific notation like 1e+48 theme_set(theme_bw()) # pre-set the bw theme. data("midwest", package = "ggplot2") # midwest <- read.csv("http://goo.gl/G1K41K") # bkup data source # Scatterplot gg = ggplot(midwest, aes(x=area, y=poptotal)) + geom_point(aes(col=state, size=popdensity)) + geom_smooth(method="loess", se=F) + xlim(c(0, 0.1)) + ylim(c(0, 500000)) + labs(subtitle="Area Vs Population", y="Population", x="Area", title="Scatterplot", caption = "Source: midwest") plot(gg)
Remember equation 1!
::: {#box1 .green-box} Wrapping it up! :::
::: {#box2 .info-box .caution} - Cras tincidunt felis venenatis pretium iaculis^[In eget eros sit amet leo feugiat consequat]. - Curabitur in tortor at tellus fermentum elementum vel quis sem. - That sums it up! :::
::: {#box3 .info-box .warning} Be careful, be gentle, be brave! And remember the above box! :::
::: {.info-box .tip} A tip! :::
::: {.info-box .note} A note! :::
::: {.info-box .important} I have something important to say here! :::
::: {#box4 .orange-box} An orange box!!! :::
xfun::session_info()
Any scripts or data that you put into this service are public.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.