knitr::opts_chunk$set(dpi = 300, dev.args = list(type = "cairo")) # Load packages pacman::p_load(plyr, tidyverse, lubridate, ggvis, patchwork)#, ggpubr)
data(iris)
This is text. This is italic and bold text.
This is a numbered list
This is an unnumbered list
dp1 = iris %>% group_by(Species) %>% summarise(mean = round(mean(Sepal.Length), 1)) ggplot(data=dp1, aes(x=Species, y=mean, label=mean)) + geom_bar(stat="identity", position = position_dodge(), fill = "navy") + geom_text(position = position_dodge(0.9), vjust=-0.5, hjust=0.5, color="black", size=2.5) + labs(x = "Species", y = "Mean Sepal Length", title = "Title") + theme_bw() + theme(plot.title = element_text(hjust = 0.5), panel.grid.major.x = element_blank(), legend.position = "none")
p1 = ggplot(data=iris, aes(x=Sepal.Length, y=Petal.Length)) + geom_point(size=2, color = "navy") + labs(x = "Sepal Length", y = "Petal Length", title = "Title") + theme_bw() + theme(plot.title = element_text(hjust = 0.5), legend.position = "none") p2 = ggplot(iris, aes(x=Species, y=Sepal.Width)) + geom_violin(trim=FALSE, fill="#47a33c") + geom_boxplot(width=0.1) + labs(x = "Species", y = "Sepal Width", title = "Title", subtitle = "Subtitle") + theme_bw() + theme(plot.title = element_text(hjust = 0.5), plot.subtitle = element_text(hjust = 0.5), panel.grid.major.x = element_blank(), legend.position = "none") #ggarrange(p1, p2, ncol=2) # using patchwork p1 + p2
Right Left Center Default ------- ------ ---------- ------- 12 12 12 12 123 123 123 123 1 1 1 1
Table: Demonstration of simple table syntax.
------- ------ ---------- ------- 12 12 12 12 123 123 123 123 1 1 1 1 ------- ------ ---------- -------
Centered Default Right Left Header Aligned Aligned Aligned
First row 12.0 Example of a row that spans multiple lines.
Second row 5.0 Here's another one. Note the blank line between rows.
Table: Here's the caption. It, too, may span multiple lines.
More about tables here
:::::::::::::: {.columns} ::: {.column}
Content of column 1
::: ::: {.column} Content of column 2
::: ::::::::::::::
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.