indoc <- '
---
title: "Basic SASmarkdown Doc"
author: "Doug Hemken"
output: html_document
---
# An R console example
## In a first code chunk, set up with
```{r}
library(SASmarkdown)
```
## Then mark SAS code chunks with
```{sas}
data class;
set sashelp.class;
bmi = 703*weight/height**2;
run;
proc means;
var bmi;
run;
```
Some more document text here.
'
if (!is.null(SASmarkdown::find_sas())) {
# To run this example, remove tempdir().
fmd <- file.path(tempdir(), "test.md")
fhtml <- file.path(tempdir(), "test.html")
knitr::knit(text=indoc, output=fmd)
rmarkdown::render(fmd, "html_document", fhtml)
}
Run the code above in your browser using DataLab