Learn R Programming

R.rsp (version 0.46.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.46.0

License

LGPL (>= 2.1)

Issues

Pull Requests

Stars

Forks

Last Published

February 17th, 2024

Functions in R.rsp (0.46.0)

Non-documented objects

Non-documented objects
HtmlRspLanguage

The HtmlRspLanguage class
RspDocument

The RspDocument class
RspErrorDirective

The RspErrorDirective class
R.rsp-package

Package R.rsp
RspEvalDirective

The RspEvalDirective class
RspException

The RspException class
RRspPackage

The RRspPackage class
RspLanguage

The RspLanguage class
RspMetaDirective

The RspMetaDirective class
RspCutDirective

The RspCopyDirective class
HttpDaemon$appendRootPaths

Appends and inserts new paths to the list of known root directories
RspDirective

The abstract RspDirective class
HttpDaemonRspResponse

The HttpDaemonRspResponse class
[.RspDocument

Subsets an RspDocument
.readText

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

The RspCode class
RspCodeChunk

The RspCodeChunk class
RspComment

The RspComment class
RspExpression

The RspExpression class
RspPageDirective

The RspPageDirective class
RspParser

The RspParser class
RspObject

The abstract RspObject class
RspConstruct

The RspConstruct class
RspShSourceCode

The RspShSourceCode class
RspPage

The RspPage class
RspIfDirective

The RspIfDirective class
RspIncludeDirective

The RspIncludeDirective class
as.character.HttpDaemon

Returns a short string describing the HTTP daemon
RspString

The RspString class
RspFileProduct

The RspFileProduct class
dropEmptyText.RspDocument

Drops all empty RSP text constructs
RspShSourceCodeFactory

The RspShSourceCodeFactory class
RspStringProduct

The RspStringProduct class
escape.RspLanguage

Escapes a string specifically for a given RSP response language
findProcessor.RspProduct

Locates a processor for an RSP product
flatten.RspDocument

Flattens an RspDocument
RspProduct

The RspProduct class
RspSourceCode

The RspSourceCode class
RspUnparsedDirective

The RspUnparsedDirective class
RspText

The RspText class
getAbsolutePath.RspPage

Gets the absolute pathname to the current RSP file
RspRSourceCode

The RspRSourceCode class
as.character.HttpRequest

Returns a short string describing the HTTP request
RspRSourceCodeFactory

The RspRSourceCodeFactory class
RspUnknownDirective

The RspUnknownDirective class
RspResponse

The RspResponse class
compileAsciiDoc

Compiles an AsciiDoc file
RspSourceCodeFactory

The RspSourceCodeFactory class
as.character.RspStringProduct

Returns a plain character string representation of an RSP string product
getAttributes.default

Gets and sets attributes of an object
RspVariableDirective

The RspVariableDirective class
RspVoid

The RspVoid class
buildVignette

Builds a vignette
buildNonSweaveTexToPdf

Compiles all TeX files into PDFs
buildNonSweaveVignette

Builds a non-Sweave Rnw vignette
RRspPackage$capabilitiesOf

Checks which tools are supported
RspUnparsedExpression

The RspUnparsedExpression class
compileKnitr

Compiles a Knitr file
buildNonSweaveVignettes

Builds all non-Sweave Rnw vignette
compileLaTeX

Compiles a LaTeX file
compileAsciiDocNoweb

Compiles an AsciiDoc noweb file
compileRsp

Compiles an RSP file
findAsciiDoc

Locates the asciidoc executable
findPandoc

Locates the pandoc executable
getCompleteCode.RspSourceCodeFactory

Gets the source code header, body, and footer
buildPkgIndexHtml

Builds a package index HTML file
HttpDaemon$getConfig

Retrieves the server's 'config' structure from Tcl
getFile.RspIncludeDirective

Gets the file attribute
evaluate.RspDocument

Parses, translates, and evaluates the RSP document
compileSweave

Compiles a Sweave file
HttpDaemon$getHttpRequest

Gets the HTTP request
evaluate.RspRSourceCode

Parses and evaluates the R code
compileMarkdown

Compiles a Markdown file
getName.RspPage

Gets the (base)name of the current RSP file
flush.RspResponse

Flushes the response buffer
getAbsolutePath.FileRspResponse

Gets the absolute pathname to the current RSP file
compileRnw

Compiles a Rnw file
getNewline.RspLanguage

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

Recreates an RSP string from an RspConstruct
browseRsp

Starts the internal web browser and opens the URL in the default web browser
evaluate.RspString

Parses, translates, and evaluates the RSP string
getContentType.HttpRequest

Gets the MIME type of the body of the request
getServerPort.HttpRequest

Gets the port number on which this request was received
getSource.RspDocument

Gets the source reference of an RSP document
exprToCode.RspSourceCodeFactory

Translates an RspExpression into source code
getContent.RspEvalDirective

Gets the content of the RSP eval directive
HttpDaemon$getDefaultFilenamePattern

Gets the default filename pattern to be loaded by the HTTP daemon
getCode.RspCode

Gets the source code
getComment.RspComment

Gets the comment
getOutput.FileRspResponse

Gets the output for an RSP response
getInclude.RspConstruct

Checks whether an RSP construct will include text to the output or not
getType.RspProduct

Gets the type of an RSP product
evaluate.RspShSourceCode

Evaluates the shell (sh) code
getParameter.HttpRequest

Gets a parameter
evaluate.RspSourceCode

Evaluates the source code
getComment.RspConstruct

Gets the comment of an RSP construct
getContent.RspIncludeDirective

Gets the content of the RSP include directive
getComment.RspLanguage

Gets a comment string specific for a given RSP response language
getScheme.HttpRequest

Gets the scheme used to make this request
getType.RspString

Gets the type of an RSP string
hasProcessor.RspProduct

Checks whether a processor exist or not for an RSP product
getContent.RspText

Gets the contents of the RSP text
mergeTexts.RspDocument

Merge neighboring 'text' elements
indexOfNonQuoted

Gets the first index of a string that is not inside a double quoted string
getLanguage.RspLanguage

Gets the language string
parseExpression.RspUnparsedExpression

Parses the unknown RSP expression for its class
getEcho.RspCode

Checks whether the source code should be echoed or not
getFile.RspEvalDirective

Gets the file attribute
getPath.RspDocument

Gets the path to the source reference of an RSP string
nbrOfLines.RspString

Gets the number of lines in an RSP string
getContentLength.HttpRequest

Gets the length of contents
getParameters.HttpRequest

Gets all parameters
print.RspObject

Prints a summary of an RSP object
getLanguage.RspSourceCodeFactory

Gets the language
getPath.FileRspResponse

Gets the path of the directory of the current RSP file
getRemoteHost.HttpRequest

Gets the fully qualified name of the client that sent the request
getName.FileRspResponse

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

Gets the path of the directory of the current RSP file
process.RspProduct

Processes an RSP file product
parseRaw.RspParser

Parses the string into blocks of text and RSP
toR.RspDocument

Translates the RSP document into R source code
toR.RspString

Parses and translates the RSP string into R code
getRealPath.HttpRequest

Gets the file system path for a given URI
getServerName.HttpRequest

Gets the host name of the server that reviewed the request
HttpDaemon$getRootPaths

Gets the root directories of the HTTP daemon
getVerbatim.RspIncludeDirective

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

Gets the socket port of the HTTP daemon
getVerbatim.RspLanguage

Gets a verbatim string specific for a given RSP response language
getRemoteAddress.HttpRequest

Gets the IP address of the client that sent the request
getProtocol.HttpRequest

Gets the name and version of the protocol used to make this request
rcat

Evaluates an RSP string and outputs the generated string
nbrOfParameters.HttpRequest

Gets the number of parameters
getType.RspDocument

Gets the type of the RspDocument
getWrap.RspIncludeDirective

Get the wrap length
hasParameter.HttpRequest

Checks if a parameter exists
getType.RspPageDirective

Gets the content type
openUrl.HttpDaemon

Starts the HTTP daemon and launches the specified URL
HttpDaemon$isStarted

Checks if the HTTP daemon is started
parseCode.RspRSourceCode

Parses the R code
parseDirective.RspUnparsedDirective

Parses the unknown RSP directive for its class
makeSourceCode.RspSourceCodeFactory

Makes a RspSourceCode object
preprocess.RspDocument

Processes all RSP preprocessing directives
rcode

Compiles an RSP document and returns the generated source code script
getSource.RspString

Gets the source reference of an RSP string
parseVignette

Parses an Rnw file
rclean

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

Locates and parses all vignettes
rfile

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

A tangle function for RSP documents
print.RspArguments

Prints RSP arguments
rcompile

Compiles an RSP document
getSuffixSpecs.RspConstruct

Gets the suffix specifications
parseDocument.RspParser

Parse an RSP string into and RSP document
HttpDaemon$setRootPaths

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

A weave function for RSP documents
startHelp.HttpDaemon

Starts the HTTP daemon and launches the help page
parseDocument.RspString

Parses an RSP string into a RSP document
rstring

Evaluates an RSP string and returns the generated string
HttpDaemon$sourceTcl

Loads the Tcl source for the HTTP daemon into R
subset.RspDocument

Subsets an RspDocument
trimNonText.RspDocument

Trims all non-text RSP constructs
requireAttributes.RspDirective

Asserts that certain attributes exist
toSourceCode.RspSourceCodeFactory

Translates an RSP document to source code
HttpDaemon$processRsp

Processes an RSP page
tidy.RspSourceCode

Tidy up the RSP source code
HttpDaemon$restart

Restarts the HTTP daemon
trim.RspDocument

Trims each of the RSP constructs
splitUrl

Decomposes a URL into its components
rargs

Gets RSP arguments of an RSP document
toLatex.character

Escapes character strings to become LaTeX compatible
tangle.RspSourceCode

Drops all text-outputting calls from the source code
HttpDaemon$terminate

Terminates the HTTP daemon
HttpDaemon$start

Starts the HTTP daemon
typeOfRnw

Checks whether an Rnw file is a Sweave or a knitr file
view.RspProduct

Views the RSP product
writeResponse.HttpDaemon

Writes a string to the HTTP output connection
writeResponse.RspResponse

Writes an RSP response to the predefined output
HttpDaemon

The HttpDaemon class
FileRspResponse

The FileRspResponse class
HttpRequest

The HttpRequest class