abspath: Convert relative path to absolute path...

View source: R/utils.R

abspathR Documentation

Convert relative path to absolute path...

Description

Convert relative path to absolute path

Usage

abspath(path)

Arguments

path

character specifying path in your file system

Details

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.

Value

character with absolute path

Examples

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

czarrar/niftir documentation built on April 19, 2022, 3:35 a.m.