| abspath | R Documentation |
Convert relative path to absolute path
abspath(path)
path |
character specifying path in your file system |
This will also deal with expanding a path as in path.expand.
You must ensure that the directory to your path exists, otherwise you will
get an error.
character with absolute path
abspath('~/test.nii.gz')
curdir <- getwd()
abspath('../test.nii.gz')
file.path(dirname(curdir), 'test.nii.gz') # equivalent to above
abspath('test.nii.gz')
file.path(curdir, 'test.nii.gz') # equivalent to above
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.