Skip to content

Instantly share code, notes, and snippets.

@sdtaylor
Created April 11, 2017 16:11
Show Gist options
  • Save sdtaylor/859eccf30c28dd65f9cfbe1e9b9f8aeb to your computer and use it in GitHub Desktop.
Save sdtaylor/859eccf30c28dd65f9cfbe1e9b9f8aeb to your computer and use it in GitHub Desktop.
R Windows directory stuff
> path.expand('~')
[1] "C:/Users/shawntaylor/Documents"
> normalizePath(path.expand('~'))
[1] "C:\\Users\\shawntaylor\\Documents"
> wd = getwd()
> wd
[1] "C:/Users/shawntaylor/Documents/portalPredictions"
> path.expand(wd)
[1] "C:/Users/shawntaylor/Documents/portalPredictions"
> normalizePath(path.expand(wd))
[1] "C:\\Users\\shawntaylor\\Documents\\portalPredictions"
> normalizePath('.')
[1] "C:\\Users\\shawntaylor\\Documents\\portalPredictions"
>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment