spinsas {SASmarkdown}R Documentation

Convert a specially marked up SAS file to Markdown and HTML.

Description

This function takes a SAS file containing special mark up in it's comments, and converts it to Markdown and HTML documents (or one of several other formats).

Usage

spinsas(sasfile, text=NULL, keep=FALSE, ...)

Arguments

sasfile

A character string with the name of a SAS command file, containing markup in it's comments.

text

A character string in place of a file.

keep

Whether to save intermediate files.

...

options passed to knitr::spin

Details

This function takes a SAS file containing special mark up in it's comments, and converts it into knitr's "spin" format. This is in turn sent to knitr::spin, and converted to Markdown and HTML (or one of several other formats).

Special Markup:

Each document element - document text, chunk headers, R code chunks, and SAS code chunks - ends with a semicolon at the end of a line.

Value

The path to the output file.

If given text instead of a file, returns the compiled document as a character string.

Author(s)

Doug Hemken

See Also

SASmarkdown-package

Examples


## Not run: 
indoc <- '
** # Native SASmarkdown
First, call the `SASmarkdown`` package in R.;

*R require(SASmarkdown);

** Then execute some SAS code.  First specify the
chunk header, then the code.;

*+ example;
proc means data=sashelp.class;
run;
'
x<-spinsas(text=indoc)
writeLines(x, "indoc.html")

## End(Not run)

[Package SASmarkdown version 0.8.2 Index]