These functions can be used to pragrammatically move, rename and delete scripts files.
prMoveScript(name, newDir, subdir = ".")prRenameScript(name, newName, subdir = ".")
prDeleteScript(name, subdir = ".")
Name of the script on which one wants to perform an action.
Subdirectory where to move a script.
Subdirectory of the script on which one wants to perform an action. It can
also be indicated directly in the name
parameter.
New name of the script.
# NOT RUN {
projectPath <- file.path(tempdir(), "test")
prInit(projectPath)
prScript("test")
prMoveScript("test", "testdir")
prRenameScript("testdir/test", "myTest")
prDeleteScript("testdir/myTest")
# }
Run the code above in your browser using DataLab