powered by
Modifies the provided script text and ensures the script content is executed in the correct location.
modify_script(script, args = c(), env = character(), print_commands = FALSE, is_windows_os = FALSE)
The script text
Optional script command line arguments
Optional character vector of name=value strings to set environment variables
True if to print each command before invocation (not available for windows)
True if windows based OS, false for unix based OS
The modified script text
# NOT RUN { script <- modify_script(script = 'echo test', args = c('first', 'second'), env = c('MYENV=MYENV')) # }
Run the code above in your browser using DataLab