I am using R's list.files()
function to get the list of all files in a folder. However currently, the complete path of that folder is quite lengthly, and R shortens this using ~
notation.
Is there any way to get the full path without use of ~
?
I am using R in Windows machine.
Any pointer will be highly appreciated.
CodePudding user response:
Try path.expand(list.files(path_to_directory, full.names = TRUE))
.
CodePudding user response:
normalizePath()
will prevent the shortening of the path.
For example normalizePath(list.files(full.names = TRUE))