Captures the output from .Last.value
along with the last expression
from the history file and formats them in a manner suitable for posting on
Stack Overflow.
solast(silent = FALSE, clip = TRUE, drop.curly.brace = TRUE, ...)
silent | logical(1L) set to TRUE to suppress screen display |
---|---|
clip | logical(1L) set to TRUE (default) to attempt to write to system clipboard |
drop.curly.brace | if the last call is a call to |
... | arguments to pass on to |
character, invisibly, the call and value together formatted for posting on SO
If you the expression you want captured spans multiple lines, enclose them
in a call to {
. The curly braces will be dropped from the display
to make it appear as if you typed all the commands sequentially into the R
prompt, though any interim output will not be captured.
Please note that the only output that is "captured" by this function is the
result of evaluating .Last.value
. If there were warning, errors, or
other screen output during the actual expression evaluation those will not
show up here.
lastcall
for limitations in capturing the last call
Andanda Mahto, Brodie Gaslam