Sends R code to the RStudio console for immediate evaluation or user inspection. Falls back gracefully without crashing if RStudio is unavailable or running in a headless environment.
Arguments
- code
Character vector or scalar string containing the code to execute. Multiple elements are joined by newline characters.
- execute
Logical indicating whether to execute the code immediately (
TRUE) or simply populate the console line without executing (FALSE). DefaultTRUE.- ...
Additional arguments passed to
rstudioapi::sendToConsole().
