rExecute function
Run the R code
and append to the rattle
script.
Implementation
void rExecute(WidgetRef ref, String code) {
debugPrint("R EXECUTE:\t\t'$code'");
// Add the code to the script provider so it will be displayed in the script
// tab.
updateScript(
ref,
"\n${'#' * 72}\n## -- Extra Code --\n${'#' * 72}"
'\n$code}\n',
);
ref.read(ptyProvider).write(const Utf8Encoder().convert(code));
}