Learn R Programming

⚠️There's a newer version (0.46.0) of this package.Take me there.

R.rsp (version 0.15.0)

Dynamic generation of scientific reports

Description

The RSP markup language makes any text-based document come alive. RSP provides a powerful markup for controlling the content and output of LaTeX, HTML, Markdown, AsciiDoc, Sweave and knitr documents (and more), e.g. 'Today's date is <%=Sys.Date()%>'. Contrary to many other literate programming languages, with RSP it is straightforward to loop over mixtures of code and text sections, e.g. in month-by-month summaries. RSP has also several preprocessing directives for incorporating static and dynamic contents of external files (local or online) among other things. Functions rstring() and rcat() make it easy to process RSP strings, while rfile() compiles RSP files (also online) into their final outputs, e.g. rfile('report.tex.rsp') generates 'report.pdf'. RSP is ideal for self-contained scientific reports and R package vignettes.

Copy Link

Version

Install

install.packages('R.rsp')

Monthly Downloads

15,244

Version

0.15.0

License

LGPL (>= 2.1)

Last Published

February 27th, 2014

Functions in R.rsp (0.15.0)

buildNonSweaveVignettes

Builds all non-Sweave Rnw vignette
getAbsolutePath.RspPage

Gets the absolute pathname to the current RSP file
FileRspResponse

The FileRspResponse class
RspUnparsedExpression

The RspUnparsedExpression class
RspDocument

The RspDocument class
RspPageDirective

The RspPageDirective class
RspShSourceCode

The RspShSourceCode class
findProcessor.RspProduct

Locates a processor for an RSP product
getContentType.HttpRequest

Gets the MIME type of the body of the request
[.RspDocument

Subsets an RspDocument
as.character.HttpRequest

Returns a short string describing the HTTP request
evaluate.RspSourceCode

Evaluates the source code
RspShSourceCodeFactory

The RspShSourceCodeFactory class
HtmlRspLanguage

The HtmlRspLanguage class
RspException

The RspException class
compileRnw

Compiles a Rnw file
findPandoc

Locates the pandoc executable
RspUnknownDirective

The RspUnknownDirective class
buildVignette

Builds a vignette
getContent.RspText

Gets the contents of the RSP text
evaluate.RspRSourceCode

Parses and evaluates the R code
getName.FileRspResponse

Gets the (base)name of the current RSP file
getPath.FileRspResponse

Gets the path of the directory of the current RSP file
.readText

Reads the content of a local or an online text file
RspRSourceCode

The RspRSourceCode class
R.rsp-package

Package R.rsp
getComment.RspComment

Gets the comment
RspDirective

The abstract RspDirective class
RspErrorDirective

The RspErrorDirective class
compileMarkdown

Compiles a Markdown file
getServerName.HttpRequest

Gets the host name of the server that revieved the request
RspEvalDirective

The RspEvalDirective class
RspMetaDirective

The RspMetaDirective class
HttpDaemon

The HttpDaemon class
Non-documented objects

Non-documented objects
RspIncludeDirective

The RspIncludeDirective class
RspFileProduct

The RspFileProduct class
RspPage

The RspPage class
getMetadata.RspDocument

Gets the metadata of the RspDocument
compileKnitr

Compiles a Knitr file
dropEmptyText.RspDocument

Drops all empty RSP text constructs
RspIfDirective

The RspIfDirective class
RspStringProduct

The RspStringProduct class
RspConstruct

The RspConstruct class
compileAsciiDocNoweb

Compiles an AsciiDoc noweb file
RspResponse

The RspResponse class
flatten.RspDocument

Flattens an RspDocument
compileAsciiDoc

Compiles an AsciiDoc file
getCode.RspCode

Gets the source code
RspText

The RspText class
getNewline.RspLanguage

Gets the newline string specific for a given RSP response language
RspVariableDirective

The RspVariableDirective class
compileLaTeX

Compiles a LaTeX file
getContentLength.HttpRequest

Gets the length of contents
getType.RspPageDirective

Gets the content type
evaluate.RspShSourceCode

Evaluates the shell (sh) code
evaluate.RspString

Parses, translates, and evaluates the RSP string
as.character.RspStringProduct

Returns a plain character string representation of an RSP string product
RRspPackage$capabilitiesOf

Checks which tools are supported
RspSourceCode

The RspSourceCode class
RspParser

The RspParser class
buildNonSweaveTexToPdf

Compiles all TeX files into PDFs
getContent.RspIncludeDirective

Gets the content of the RSP include directive
getParameters.HttpRequest

Gets all parameters
getAttributes.RspObject

Gets the attributes of an RSP object
RspExpression

The RspExpression class
getParameter.HttpRequest

Gets a parameter
getPath.RspPage

Gets the path of the directory of the current RSP file
compileSweave

Compiles a Sweave file
as.character.HttpDaemon

Returns a short string describing the HTTP daemon
HttpDaemon$getPort

Gets the socket port of the HTTP daemon
asRspString.RspConstruct

Recreates an RSP string from an RspConstruct
getLanguage.RspLanguage

Gets the language string
escape.RspLanguage

Escapes a string specifically for a given RSP response language
buildPkgIndexHtml

Builds a package index HTML file
getComment.RspConstruct

Gets the comment of an RSP construct
getComment.RspLanguage

Gets a comment string specific for a given RSP response language
RspProduct

The RspProduct class
getSuffixSpecs.RspConstruct

Gets the suffix specifications
exprToCode.RspSourceCodeFactory

Translates an RspExpression into source code
buildNonSweaveVignette

Builds a non-Sweave Rnw vignette
browseRsp

Starts the internal web browser and opens the URL in the default web browser
getFile.RspIncludeDirective

Gets the file attribute
getType.RspProduct

Gets the type of an RSP product
getCompleteCode.RspSourceCodeFactory

Gets the source code header, body, and footer
compileRsp

Compiles an RSP file
getPath.RspDocument

Gets the path to the source reference of an RSP string
RspComment

The RspComment class
rscript

Compiles an RSP string and returns the generated source code script
HttpDaemon$isStarted

Checks if the HTTP daemon is started
hasProcessor.RspProduct

Checks whether a processor exist or not for an RSP product
HttpDaemon$setRootPaths

Sets a new set of root directories for the HTTP daemon
rspTangle

A tangle function for RSP documents
rsp

Compiles an RSP document
RspCodeChunk

The RspCodeChunk class
parse.RspRSourceCode

Parses the R code
HttpDaemon$restart

Restarts the HTTP daemon
parse.RspString

Parses the RSP string
nbrOfLines.RspString

Gets the number of lines in an RSP string
mergeTexts.RspDocument

Merge neighboring 'text' elements
openUrl.HttpDaemon

Starts the HTTP daemon and launches the specified URL
getLanguage.RspSourceCodeFactory

Gets the language
trimNonText.RspDocument

Trims all non-text RSP constructs
getSource.RspString

Gets the source reference of an RSP string
importRsp

Imports an RSP file
getAbsolutePath.FileRspResponse

Gets the absolute pathname to the current RSP file
translateRsp

Translates an RSP file to an R RSP source file
parse.RspUnparsedExpression

Parses the unknown RSP expression for its class
HttpDaemon$sourceTcl

Loads the Tcl source for the HTTP daemon into R
nbrOfParameters.HttpRequest

Gets the number of parameters
HttpRequest

The HttpRequest class
parseVignettes

Locates and parses all vignettes
rclean

Compiles an RSP document into a preprocessed and validated RSP document
preprocess.RspDocument

Processes all RSP preprocessing directives
getVerbatim.RspLanguage

Gets a verbatim string specific for a given RSP response language
HttpDaemon$getConfig

Retrieves the server's 'config' structure from Tcl
evaluate.RspDocument

Parses, translates, and evaluates the RSP document
getSource.RspDocument

Gets the source reference of an RSP document
getMetadata.RspProduct

Gets the metadata an RSP product
getRealPath.HttpRequest

Gets the file system path for a given URI
getFile.RspEvalDirective

Gets the file attribute
getRemoteAddress.HttpRequest

Gets the IP address of the client that sent the request
HttpDaemon$getHttpRequest

Gets the HTTP request
indexOfNonQuoted

Gets the first index of a string that is not inside a double qouted string
print.RspArguments

Prints RSP arguments
toLatex.character

Escapes character strings to become LaTeX compatible
import.RspResponse

Imports the output from another RSP file
getServerPort.HttpRequest

Gets the port number on which this request was received
RspLanguage

The RspLanguage class
write.RspResponse

Writes an RSP response to the predefined output
getContent.RspEvalDirective

Gets the content of the RSP eval directive
getMetadata.RspString

Gets the metadata of the RspDocument
rfile

Evaluates and postprocesses an RSP document and outputs the final RSP document file
sourceAllRsp

Processes one or several RSP files
getName.RspPage

Gets the (base)name of the current RSP file
tangle.RspSourceCode

Drops all text-outputting calls from the source code
rsptex

Compiles an RSP LaTeX file into a DVI file
RspString

The RspString class
RRspPackage

The RRspPackage class
HttpDaemon$getDefaultFilenamePattern

Gets the default filename pattern to be loaded by the HTTP daemon
trim.RspDocument

Trims each of the RSP constructs
tidy.RspSourceCode

Tidy up the RSP source code
typeOfRnw

Checks whether an Rnw file is a Sweave or a knitr file
rargs

Gets RSP arguments of an RSP document
RspCode

The RspCode class
getRemoteHost.HttpRequest

Gets the fully qualified name of the client that sent the request
HttpDaemon$start

Starts the HTTP daemon
getWrap.RspIncludeDirective

Get the wrap length
parseVignette

Parses an Rnw file
rspWeave

A weave function for RSP documents
getType.RspDocument

Gets the type of the RspDocument
parseRaw.RspParser

Parses the string into blocks of text and RSP
requireAttributes.RspDirective

Asserts that certain attributes exist
HttpDaemon$stop

Stops the HTTP daemon
HttpDaemon$appendRootPaths

Appends and inserts new paths to the list of known root directories
parse.RspParser

Parses the RSP string
toR.RspDocument

Translates the RSP document into R source code
toR.RspString

Parses and translates the RSP string into R code
flush.RspResponse

Flushes the response buffer
parseRsp

Parse an RSP code string to an R RSP code string
print.RspObject

Prints a summary of an RSP object
findAsciiDoc

Locates the asciidoc executable
RspSourceCodeFactory

The RspSourceCodeFactory class
process.RspProduct

Processes an RSP file product
getInclude.RspConstruct

Checks whether an RSP construct will include text to the output or not
RspObject

The abstract RspObject class
view.RspProduct

Views the RSP product
rcat

Evaluates an RSP string and outputs the generated string
RspUnparsedDirective

The RspUnparsedDirective class
getOutput.FileRspResponse

Gets the output for an RSP response
toSourceCode.RspSourceCodeFactory

Translates an RSP document to source code
hasParameter.HttpRequest

Checks if a parameter exists
writeResponse.HttpDaemon

Writes a string to the HTTP output connection
parse.RspUnparsedDirective

Parses the unknown RSP directive for its class
getVerbatim.RspIncludeDirective

Checks if verbatim include should be used or not
HttpDaemon$getRootPaths

Gets the root directories of the HTTP daemon
HttpDaemon$processRsp

Processes an RSP page
rstring

Evaluates an RSP string and returns the generated string
translateRspV1

Translates an RSP file to an R servlet
getType.RspString

Gets the type of an RSP string
rspToHtml

Compiles an RSP file to an HTML file
startHelp.HttpDaemon

Starts the HTTP daemon and launches the help page
splitUrl

Decomposes a URL into its components
subset.RspDocument

Subsets an RspDocument
getEcho.RspCode

Checks whether the source code should be echoed or not
HttpDaemonRspResponse

The HttpDaemonRspResponse class
RspRSourceCodeFactory

The RspRSourceCodeFactory class
getProtocol.HttpRequest

Gets the name and version of the protocol used to make this request
getScheme.HttpRequest

Gets the scheme used to make this request
rcompile

Compiles an RSP document
sourceRsp

Processes an RSP file by translating it to an R servlet, which is then sourced
makeSourceCode.RspSourceCodeFactory

Makes a RspSourceCode object