Headings

You can make levels of headings in Rmarkdown documents using hash

one hash for big headings

two hash for smaller headings

three hash for even smaller headings

and so on and so on…..

Don’t forget to add a space after the hash for the title to display

Bold and Italics

You can make words bold or italics by using the asterik sign on both sides of the text.

two asterik for Bold

one asterik for Italics

Bullet points

You can bullet points by using dashes.

Don’t forget to add a space after the dash to get the bullet to show

Quotations

You can get quotes using >

“Not all things mean well end well- Fiona Zhou”

Pictures/GIFs/Tweets

You can embed all kinds of material using RMarkdown

Pictures

use back tick![](nameofimage.png)back tick to generate a picture

TwitterX

At the post used the three dots and select embed post to copy/past code

GIFs

use back tick![](nameofimage.gif)back tick to generate a GIF or Find a gif to embed <> and copy/paste code

What about code? HOw to insert code

We can intersperse notes and code “chunks”

use the green c + insert pull down or hotkey command+option I (mac)/ctrl+Alt+I (windows/linux).

To run the code select the green down arrow on the top right corner of the code chunk box or use hotkey ctrl+shift+Enter

load Packages

library(tidyverse)
library(readr)
library(here)
library(tinytex)

read in the beaches data

beaches <- read_csv(here("data","cleanbeaches_new.csv"))

plot mean bug levels by site

beaches%>%
  na.omit() %>%
  group_by(site)%>%
  summarise(meanbugs = mean(beachbugs))%>%
  ggplot(aes(x=site, y=meanbugs))+
  geom_col()+
  coord_flip()

# Export formats

The default is html, you can also export to pdf or word

install.package(“tinytex”) library(tinytex)