redSplitOut {redcas} | R Documentation |
convert the vector returned by redExec into commands and command output.
Description
REDUCE output contains both the commands issued and the output from the
commands. Since the output is of interest, redSplitOut separates the
input vector into a list containing vectors of output, commands and the
input to redSplitOut
.
Usage
redSplitOut(x)
Arguments
x |
a character vector containing REDUCE output |
Details
Although it is possible to use the REDUCE switch ECHO to prevent display
of commands, this does not prevent display of the sequence numbers for
the commands. redSplitOut
can be called by redExec
to
separate the output from the commands. It can also be used after the
call if the split
option was not used or on an arbitrary output
file from REDUCE, for example the full output which can be retrieved by
redClose
.
Value
A list containing three elements:
out |
the command output |
cmd |
the commands |
raw |
the input to |
Author(s)
Martin Gregory
See Also
Examples
result <- c("5: ",
"{x=-1}",
"",
"6: ",
"b := {{2,12},{11,1}}",
"",
"7: ",
"8: ",
" - m",
"la := ---------------------",
" 2 2",
" sqrt(v(3) + v(2) )",
"",
"9: ",
"",
"10: ")
split <- redSplitOut(result)
writeLines(split$out)