I want to make it so that when you run a function in one R script, it will create a brand new R script. For example, suppose in my one R script I have a function that requires user input for the name of this new script, along with the script contents…see example below.
create_script <- function(name,script_code){
# What do I put here to create and open the new script?
}
1