tags:

views:

155

answers:

1

In R on windows, tempdir() returns a path that contains short names for non 8dot3 directory names. How do I expand those to long names? An answer that uses pure R code is favorable, but one that uses well-known shell commands used via system() is fine as a backup.

+7  A: 

The normalizePath function will turn short names into long names:

This converts relative paths to absolute paths, and converts short names to long names.

Mark Rushakoff
Excellent! I was trying file.path, path.expand, and I even found tools::file_path_as_absolute, but none worked. Thanks!
Jeff
Jeff, since this solved your problem you should mark the answer as accepted. I'm not trying to whine about reputation or anything, but your avatar will display your "accepted answer" rate after a while (higher percentage generally means people will give better/more answers), and it will help other people browsing through SO if they see that there is an accepted answer to this question.
Mark Rushakoff
Yeah, thanks. I'm still figuring SO out. It actually took me a few minutes to figure out how to "accept" the thing. Du! you have to log in.
Jeff