Quiz 2 Reproducible
ResearchWho created Markdown?
Answer
What is Markdown? What is Markdown?
When writing a document in R Markdown, how do you denote the beginning of an R code chunk?
When using knitr, how do you indicate the height and width of a plot created in a code chunk?
Answer
According to the Yihui Xie on its webpage:
fig.width, fig.height: (both are 7; numeric) Width and height of the plot (in inches), to be used in the graphics device.
With some code chunks, we may not want the output generated by the chunk to be rendered into HTML but would prefer to print the output verbatim. How can we specify this preference for a given code chunk?
Answer
# Example.
cat("**Hello** World!")
Hello World!
When using knitr and R Markdown and producing output in HTML, why should you never edit the resulting HTML file?
Answer
Processing of knitr Documents (what happens under the hood):
.Rmd).md).Rmd -> .md -> .html
.md and
.html files..md or
.html documents until you are finished