# NOT RUN {
# Create a template file in the tempdir...
template <- tempfile("template", fileext = ".txt")
cat("Example template file to be used with file_edit()", file = template)
# ... and edit a new file, starting from that template:
new_file <- tempfile("test", fileext = ".txt")
file_edit(new_file, template = template, wait = TRUE)
message("Your file contains:")
readLines(new_file)
# Eliminate both the file and template
unlink(new_file)
unlink(template)
# }
Run the code above in your browser using DataLab