if (FALSE) {
indoc <- "/*'
# Statamarkdown Example
This is a special Stata script which can be used to generate a report.
You can write normal text in command-style comments.
First we load Statamarkdown.
'*/
/*+ setup +*/
/*R
library(Statamarkdown)
R*/
/*' The report begins here. '*/
/*+ example1, engine='stata' +*/
sysuse auto
/* Stata comment */
summarize
/*' You can use the ***usual*** Markdown to mark up text.'*/
"
if (!is.null(Statamarkdown::find_stata())) {
# To run this example, remove tempdir().
fhtml <- file.path(tempdir(), "test.html")
x<-Statamarkdown::spinstata(text=indoc)
writeLines(x, fhtml)
}
}
Run the code above in your browser using DataLab