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://shorturl.at/2TwmYinclude a plot
plot(mtcars$disp, mtcars$mpg)add option
fig-height: 4,fig-width: 6andfig-align: rightto the chunk for your plot. What are the changes?
Once done, commit with message “04-codechunk” and push your work to GitHub.
(Optional)
How do we set global chunk options to not show the code in every chunk in the document?
Show dataset
mtcarsas a table usingknitr::kable()Do some inline code calculation like `r ncol(mtcars)`, `r log(100, base = 10) + sqrt(4)`.