Description Usage Arguments Details Value Author(s) See Also Examples
Evaluate string(s) containing R commands and return the text transcript or printed results
1 2 3 |
expression |
R expression to be evaluated |
sourceText |
Vector of string to be evaluated. |
collapse |
Line separator. Defaults to |
echo |
Should commands be shown in output. Defaults to
|
capture
captures the results of executing expression
using a textConnection
. texteval
and printed
parse and evaluate the contents of sourceText
using source
and the results are captured using a
textConnection
. If collapse
is NULL, a
vector of strings is returned, one element for each line of output.
(Empty strings for blank lines). If collapse
is non-NULL, the
a single character string is formed by pasting the individuals
elements together separated by this value. When echo
is TRUE,
texteval
will return a transcript that includes both printed
output and evaluated commands. When echo
is FALSE,
texteval
will return only the printed output. printed
always returns only the printed output.
These functions were created to allow strings provided from external processes (for example by rpy or RSPerl) to be evaluated as if they were scripts.
A single character string if collapse
is non-NULL, otherwise a
vector of character strings.
Gregory R. Warnes greg@warnes.net
source
, textConnection
,
sink
, parse
, eval
1 2 3 4 5 6 7 8 9 10 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.