#Headings you can make levels of heading in Rmarkdown documents using hash.
you can also make thisng bold and ital using asterisks on either side of the text. Use one for italic, two for bold
I want this to be bold
I want this to be italics
we can make bullet points with dashes. - bullet 1 - bullet 2
dont forget to put a space after the dash to get bullets
get quotes using a “>” as a starter
“Insert a really inspiring quote here”
You can insert links with a combination of round and square brackets. put the text in square brackets, and the url in round brackets.
You can find resources from our RMT event at Jen’s github
it’s pretty easy to embed all kinds of things in Rmarkdown documents.
Use ‘
’ make sure that it’s in the same
folder as the html file
Use embed code from twitter to insert tweets. Since i don’t have twitter, i tried embedding linkedin post code and it works!
also use the embed code
We can intersperse notes & code “chunks” Click “C+ Insert” and click ‘R’ from the dropdown menu. OR press ‘option + command + I’ for shortcut To run the code, press the green arrow on each chunk, OR press Cntrl+shift+enter.
to remove messages from codechunks that you don’t wanna show, click setting -> untick ‘show warnings’ and ‘show messages’
library(tidyverse)
library(readr)
beaches <- read_csv("cleanbeaches.csv")
beaches %>%
group_by(site) %>%
summarise(meanbugs = mean(beach_bugs, na.rm = TRUE)) %>%
ggplot(aes(x = meanbugs, y = site)) +
geom_col() +
theme_classic() +
labs (title = "Mean Bacteria Levels at Eastern Suburbs Beaches",
subtitle = "Enter a cool subtitle here",
caption = "Sources: NSW gov",
x = "Mean levels",
y = "Eastern Suburbs Beaches")
the default is html, but we can export in other formats using the drop down in ‘knit’ botton. in practice, the word might be useful if you wanna showcase codes to your supervisor (although not sure why it doesnt show some of the output like graphs).
the pdf is more tricky as it depends on your computer processor (often it will gives error related to ‘LaTex’ installment).
lets try to instal ‘tinytex’ to see if this solves the problem (it doesnt…)
install.packages(“tinytex”) library(tinytex)