sas_output {SASmarkdown}R Documentation

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)

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.

.

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.

Value

This returns a call to knitr::engine_output.

Author(s)

Doug Hemken

See Also

SASmarkdown,

Examples

## 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)

[Package SASmarkdown version 0.8.2 Index]