sas_output | R Documentation |
When knitr calls SAS to produce various forms of output, that output is often more cluttered than what you want to show in your SAS markdown documentation.
This function filters the output returned by SAS prior to invoking
knitr's engine_output()
function.
sas_output(options, code, out, extra = NULL)
options |
options object passed from a SAS engine. |
code |
code object passed from a SAS engine. |
out |
out object passed from a SAS engine. |
extra |
anything else to add to the document. |
.
This redefinition adds a filter to the standard engine_output()
.
At present, the same filtering is used for both SAS ODS
and SAS listing output.
In the future more choice and nuance could be added here.
The user should not need to invoke this directly.
This returns a call to knitr::engine_output
.
Doug Hemken
SASmarkdown
,
## Not run:
indoc <- '
---
title: "Basic SASmarkdown Doc"
author: "Doug Hemken"
output: html_document
---
# In a first code chunk, set up with
```{r}
library(SASmarkdown)
```
# Then set up SAS code chunks with
```{sas}
proc means data=sashelp.class;
run;
```
'
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)
}
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.