Description Usage Arguments Details Value Author(s)
Parse a R transcript file into blocks of commands and output.
1 | parseTranscriptFile(file, ignoreUpToRegExpr = NULL, ignoreAfterRegExpr=NULL, subst=NULL)
|
file |
The name of the file containing transcripts. |
ignoreUpToRegExpr |
If non-NULL, discard lines in the file up to and including the line that matches this regular expression. |
ignoreAfterRegExpr |
If non-NULL, discard lines in the file including and beyond the line that matches this regular expression. |
subst |
Provides control over whether the string "pacakge:::" is removed from test code. The default value should work. |
Tries to split the lines in file
up into blocks with the
following structure:
commments: lines preceeding the test that begin with > #
or that are empty
command: line beginning with >
and subsequent lines
beginning with the continuation char +
control: lines following the command that begin with #@
output: other lines following the command and before the next comment or command, which are presumed to be output from the command
A list of commands and their associated (apparent) output. Each element of the list is a list with the following possible components:
comment |
A character vector containing the lines that were interpreted as comments |
input |
A character vector containing the lines that were interpreted as commands |
expr |
The parsed input (an expression). Will be a character vector containing an error message if the input could not be parsed as an R expression. |
control |
A character vector containing the lines that were interpreted as control lines |
output |
A character vector containing the lines that were interpreted as output lines |
Tony Plate
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.