Learn R Programming

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

R.rsp (version 0.19.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, rsource() sources an RSP file as it was an R script, while rfile() compiles it (even online) into its final output format, e.g. rfile('report.tex.rsp') generates 'report.pdf' and rfile('report.md.rsp') generates 'report.html'. RSP is ideal for self-contained scientific reports and R package vignettes. It's easy to use - if you know how to write an R script, you'll be up and running within minutes.

Copy Link

Version

Install

install.packages('R.rsp')

Monthly Downloads

15,887

Version

0.19.0

License

LGPL (>= 2.1)

Last Published

June 8th, 2014

Functions in R.rsp (0.19.0)

RspComment

The RspComment class
RspResponse

The RspResponse class
exprToCode.RspSourceCodeFactory

Translates an RspExpression into source code
evaluate.RspRSourceCode

Parses and evaluates the R code
getCode.RspCode

Gets the source code
getAbsolutePath.RspPage

Gets the absolute pathname to the current RSP file
RspText

The RspText class
findProcessor.RspProduct

Locates a processor for an RSP product
R.rsp-package

Package R.rsp
getType.RspProduct

Gets the type of an RSP product
parse.RspParser

Parses the RSP string
RspUnparsedExpression

The RspUnparsedExpression class
HttpDaemon$restart

Restarts the HTTP daemon
getRealPath.HttpRequest

Gets the file system path for a given URI
process.RspProduct

Processes an RSP file product
evaluate.RspDocument

Parses, translates, and evaluates the RSP document
print.RspArguments

Prints RSP arguments
getContentType.HttpRequest

Gets the MIME type of the body of the request
HttpDaemon

The HttpDaemon class
RspCodeChunk

The RspCodeChunk class
RspDocument

The RspDocument class
browseRsp

Starts the internal web browser and opens the URL in the default web browser
getOutput.FileRspResponse

Gets the output for an RSP response
HttpDaemon$getHttpRequest

Gets the HTTP request
Non-documented objects

Non-documented objects
RspMetaDirective

The RspMetaDirective class
RspCode

The RspCode class
RspStringProduct

The RspStringProduct class
RspErrorDirective

The RspErrorDirective class
getContent.RspEvalDirective

Gets the content of the RSP eval directive
getAbsolutePath.FileRspResponse

Gets the absolute pathname to the current RSP file
RspException

The RspException class
RspExpression

The RspExpression class
RspConstruct

The RspConstruct class
getMetadata.RspProduct

Gets the metadata an RSP product
preprocess.RspDocument

Processes all RSP preprocessing directives
RspIncludeDirective

The RspIncludeDirective class
RspLanguage

The RspLanguage class
buildNonSweaveTexToPdf

Compiles all TeX files into PDFs
getPath.FileRspResponse

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

The abstract RspObject class
HttpDaemon$sourceTcl

Loads the Tcl source for the HTTP daemon into R
getVerbatim.RspIncludeDirective

Checks if verbatim include should be used or not
RspDirective

The abstract RspDirective class
escape.RspLanguage

Escapes a string specifically for a given RSP response language
buildNonSweaveVignette

Builds a non-Sweave Rnw vignette
rargs

Gets RSP arguments of an RSP document
HttpDaemon$start

Starts the HTTP daemon
getParameters.HttpRequest

Gets all parameters
RspIfDirective

The RspIfDirective class
RspRSourceCodeFactory

The RspRSourceCodeFactory class
[.RspDocument

Subsets an RspDocument
HttpDaemonRspResponse

The HttpDaemonRspResponse class
RspRSourceCode

The RspRSourceCode class
nbrOfLines.RspString

Gets the number of lines in an RSP string
RspEvalDirective

The RspEvalDirective class
rfile

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

Compiles a Rnw file
parse.RspString

Parses the RSP string
getType.RspPageDirective

Gets the content type
getPath.RspPage

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

The RspPage class
RRspPackage$capabilitiesOf

Checks which tools are supported
RRspPackage

The RRspPackage class
getContent.RspIncludeDirective

Gets the content of the RSP include directive
RspUnparsedDirective

The RspUnparsedDirective class
rspTangle

A tangle function for RSP documents
rstring

Evaluates an RSP string and returns the generated string
tangle.RspSourceCode

Drops all text-outputting calls from the source code
compileKnitr

Compiles a Knitr file
getCompleteCode.RspSourceCodeFactory

Gets the source code header, body, and footer
HttpDaemon$setRootPaths

Sets a new set of root directories for the HTTP daemon
getLanguage.RspSourceCodeFactory

Gets the language
HtmlRspLanguage

The HtmlRspLanguage class
FileRspResponse

The FileRspResponse class
RspFileProduct

The RspFileProduct class
as.character.HttpRequest

Returns a short string describing the HTTP request
RspString

The RspString class
rclean

Compiles an RSP document into a preprocessed and validated RSP document
compileSweave

Compiles a Sweave file
RspVariableDirective

The RspVariableDirective class
RspSourceCode

The RspSourceCode class
getAttributes.RspObject

Gets the attributes of an RSP object
getName.RspPage

Gets the (base)name of the current RSP file
toR.RspString

Parses and translates the RSP string into R code
RspShSourceCodeFactory

The RspShSourceCodeFactory class
getWrap.RspIncludeDirective

Get the wrap length
RspProduct

The RspProduct class
RspShSourceCode

The RspShSourceCode class
findAsciiDoc

Locates the asciidoc executable
getName.FileRspResponse

Gets the (base)name of the current RSP file
buildVignette

Builds a vignette
openUrl.HttpDaemon

Starts the HTTP daemon and launches the specified URL
buildPkgIndexHtml

Builds a package index HTML file
getContentLength.HttpRequest

Gets the length of contents
RspUnknownDirective

The RspUnknownDirective class
HttpDaemon$getDefaultFilenamePattern

Gets the default filename pattern to be loaded by the HTTP daemon
getProtocol.HttpRequest

Gets the name and version of the protocol used to make this request
getInclude.RspConstruct

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

Compiles an RSP document
asRspString.RspConstruct

Recreates an RSP string from an RspConstruct
getContent.RspText

Gets the contents of the RSP text
getVerbatim.RspLanguage

Gets a verbatim string specific for a given RSP response language
as.character.HttpDaemon

Returns a short string describing the HTTP daemon
getRemoteHost.HttpRequest

Gets the fully qualified name of the client that sent the request
getType.RspDocument

Gets the type of the RspDocument
parseVignette

Parses an Rnw file
splitUrl

Decomposes a URL into its components
flush.RspResponse

Flushes the response buffer
getLanguage.RspLanguage

Gets the language string
getEcho.RspCode

Checks whether the source code should be echoed or not
rsptex

Compiles an RSP LaTeX file into a DVI file
importRsp

Imports an RSP file
getMetadata.RspString

Gets the metadata of the RspDocument
translateRspV1

Translates an RSP file to an R servlet
getServerPort.HttpRequest

Gets the port number on which this request was received
compileRsp

Compiles an RSP file
evaluate.RspSourceCode

Evaluates the source code
compileLaTeX

Compiles a LaTeX file
writeResponse.HttpDaemon

Writes a string to the HTTP output connection
findPandoc

Locates the pandoc executable
getSource.RspString

Gets the source reference of an RSP string
view.RspProduct

Views the RSP product
nbrOfParameters.HttpRequest

Gets the number of parameters
makeSourceCode.RspSourceCodeFactory

Makes a RspSourceCode object
getSource.RspDocument

Gets the source reference of an RSP document
hasParameter.HttpRequest

Checks if a parameter exists
getComment.RspComment

Gets the comment
getNewline.RspLanguage

Gets the newline string specific for a given RSP response language
.readText

Reads the content of a local or an online text file
getServerName.HttpRequest

Gets the host name of the server that revieved the request
getScheme.HttpRequest

Gets the scheme used to make this request
toR.RspDocument

Translates the RSP document into R source code
rspToHtml

Compiles an RSP file to an HTML file
HttpDaemon$getPort

Gets the socket port of the HTTP daemon
evaluate.RspString

Parses, translates, and evaluates the RSP string
getComment.RspConstruct

Gets the comment of an RSP construct
requireAttributes.RspDirective

Asserts that certain attributes exist
tidy.RspSourceCode

Tidy up the RSP source code
getFile.RspIncludeDirective

Gets the file attribute
import.RspResponse

Imports the output from another RSP file
startHelp.HttpDaemon

Starts the HTTP daemon and launches the help page
trimNonText.RspDocument

Trims all non-text RSP constructs
hasProcessor.RspProduct

Checks whether a processor exist or not for an RSP product
parseRaw.RspParser

Parses the string into blocks of text and RSP
parse.RspUnparsedDirective

Parses the unknown RSP directive for its class
toLatex.character

Escapes character strings to become LaTeX compatible
RspSourceCodeFactory

The RspSourceCodeFactory class
getParameter.HttpRequest

Gets a parameter
typeOfRnw

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

Translates an RSP file to an R RSP source file
mergeTexts.RspDocument

Merge neighboring 'text' elements
buildNonSweaveVignettes

Builds all non-Sweave Rnw vignette
print.RspObject

Prints a summary of an RSP object
as.character.RspStringProduct

Returns a plain character string representation of an RSP string product
HttpRequest

The HttpRequest class
rcat

Evaluates an RSP string and outputs the generated string
rsp

Compiles an RSP document
getPath.RspDocument

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

The RspParser class
RspPageDirective

The RspPageDirective class
HttpDaemon$isStarted

Checks if the HTTP daemon is started
parseRsp

Parse an RSP code string to an R RSP code string
compileAsciiDoc

Compiles an AsciiDoc file
rspWeave

A weave function for RSP documents
flatten.RspDocument

Flattens an RspDocument
sourceRsp

Processes an RSP file by translating it to an R servlet, which is then sourced
compileMarkdown

Compiles a Markdown file
HttpDaemon$stop

Stops the HTTP daemon
getSuffixSpecs.RspConstruct

Gets the suffix specifications
compileAsciiDocNoweb

Compiles an AsciiDoc noweb file
HttpDaemon$getRootPaths

Gets the root directories of the HTTP daemon
indexOfNonQuoted

Gets the first index of a string that is not inside a double qouted string
evaluate.RspShSourceCode

Evaluates the shell (sh) code
HttpDaemon$getConfig

Retrieves the server's 'config' structure from Tcl
parse.RspUnparsedExpression

Parses the unknown RSP expression for its class
getRemoteAddress.HttpRequest

Gets the IP address of the client that sent the request
rscript

Compiles an RSP document and returns the generated source code script
parseVignettes

Locates and parses all vignettes
write.RspResponse

Writes an RSP response to the predefined output
toSourceCode.RspSourceCodeFactory

Translates an RSP document to source code
trim.RspDocument

Trims each of the RSP constructs
sourceAllRsp

Processes one or several RSP files
subset.RspDocument

Subsets an RspDocument
HttpDaemon$processRsp

Processes an RSP page
HttpDaemon$appendRootPaths

Appends and inserts new paths to the list of known root directories
dropEmptyText.RspDocument

Drops all empty RSP text constructs
getComment.RspLanguage

Gets a comment string specific for a given RSP response language
getFile.RspEvalDirective

Gets the file attribute
getMetadata.RspDocument

Gets the metadata of the RspDocument
getType.RspString

Gets the type of an RSP string
parse.RspRSourceCode

Parses the R code