SASmarkdown (version 0.4.3)

sas_output: A function to provide cleaner output for knitr's SAS engines.

Description

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.

Usage

sas_output(options, code, out, extra = NULL)

Value

This returns a call to knitr::engine_output.

Arguments

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.

.

Author

Doug Hemken

Details

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.

See Also

SASmarkdown,

Examples

Run this code

if (FALSE) {
indoc <- '
---
title: "Basic SASmarkdown Doc"
author: "Doug Hemken"
output: html_document
---
# In a first code chunk, set up with
```{r}
require(SASmarkdown)
sas_enginesetup(sashtml=sashtml)

sasexe <- "C:/Program Files/SASHome/SASFoundation/9.4/sas.exe"
sasopts <- "-nosplash -ls 75"
```
# Then set up SAS code chunks with
```{r, engine="sashtml", engine.path=sasexe, engine.opts=sasopts}
proc means data=sashelp.class;
run;
```
'
knitr::knit(text=indoc, output="test.md")
rmarkdown::render("test.md")
}

Run the code above in your browser using DataCamp Workspace