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
mtcarsas 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: 6andfig-align: rightto your plot. What are the changes?How do we set global chunk options to hide and run code in every chunk?
Once done, commit with message “04-Code Chunk” and push your work to GitHub.