This is an R Markdown document. Markdown is a simple formatting syntax for authoring web pages (click the Help toolbar button for more details on using R Markdown).
When you click the Knit HTML button a web page will be generated that includes both content as well as the output of any embedded R code chunks within the document. You can embed an R code chunk like this:
library(knitr)
local({
hook_plot = knit_hooks$get("plot")
knit_hooks$set(plot = function(x, options) {
if (!grepl("\\.svg", x))
return(hook_plot(x, options))
# read the content of the svg image and write it out without <?xml ... ?>
paste(readLines(x)[-1], collapse = "\n")
})
})
plot(1:10)