Lab 04: Code Chunk
Note
In lab.qmd
## Lab 4: Code Chunk
, use code chunks toinclude an image with
knitr::include_graphics("URL or file path")
https://raw.githubusercontent.com/rstudio/hex-stickers/master/PNG/ggplot2.pnginclude a plot
plot(mtcars$disp, mtcars$mpg)
Show dataset
mtcars
as a table usingknitr::kable()
Do some inline code calculation like `r ncol(mtcars)`, `r log(100, base = 10) + sqrt(4)`.
Add option
fig-height: 4
,fig-width: 6
andfig-align: right
to the chunk for your plot. What are the changes?How do we set global chunk options to not show the code in every chunk in the document?
Once done, commit with message “04-codechunk” and push your work to GitHub.