# NOTE: The use of "if(interactive())" prevents this example from running
# during automated CRAN checks. This is necessary because the example
# requires to be run from an R script. You don't need to use
# "if(interactive())" in your own scripts.
if(interactive()) {
# Store the current working directory, so we can reset it after the example.
current_wd <- getwd()
print(current_wd)
# Run this commando from a saved R script file, or R Notebook to set the working
# directory to scripts' file location
f_setwd()
# Restore your current working directory
f_setwd(current_wd)
}
Run the code above in your browser using DataLab