redSplitOut | R Documentation |
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
.
redSplitOut(x)
x |
a character vector containing REDUCE output |
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
.
A list containing three elements:
out |
the command output |
cmd |
the commands |
raw |
the input to |
Martin Gregory
redExec
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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.