-
Notifications
You must be signed in to change notification settings - Fork 1
Open
Labels
new feature 🎁New feature requestNew feature request
Description
unntested draft
rstudio_run_script_as_job <- function(
name = NULL,
wd = NULL,
import_env = FALSE
) {
require_namespace("rstudioapi")
if (!(interactive() && rstudioapi::isAvailable())) {
return(invisible())
}
if (is.null(wd)) {
wd <- if (package_available("here")) {
here::here()
} else {
message("using current working directory; suggest installing {here}")
getwd()
}
}
active_file <- rstudioapi::getSourceEditorContext()$path
name <- name %||% paste(
file_name(active_file),
format(Sys.time())
)
rstudioapi::jobRunScript(
path = active_file,
name = name,
workingDir = wd,
importEnv = import_env
)
}Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
new feature 🎁New feature requestNew feature request