In R, you can use the file.rename()
function to rename a directory. Here's an example code snippet:
main.r119 chars5 lines
Note that the file.rename()
function also works for renaming files. Make sure that the new directory name doesn't already exist, otherwise the function will throw an error.
gistlibby LogSnag