| relativePath {tractor.base} | R Documentation |
Functions for expanding file paths, finding relative paths and ensuring that a file name has the required suffix.
relativePath(path, referencePath) matchPaths(path, referencePath) expandFileName(fileName, base = getwd()) ensureFileSuffix(fileName, suffix, strip = NULL)
path, referencePath |
Character vectors whose elements represent file paths. |
fileName |
A character vector of file names. |
base |
If |
suffix |
A character vector of file suffixes, which will be recycled if
shorter than |
strip |
A character vector of suffixes to remove before appending
|
The ensureFileSuffix function returns the specified file
names with the requested suffixes appended. expandFileName returns
the full path to the specified file name, collapsing ".." elements
if appropriate. relativePath returns the specified path,
expressed relative to referencePath. matchPaths resolves a
a vector of paths against a vector of reference paths.
Jon Clayden
Please cite the following reference when using TractoR in your work:
J.D. Clayden, S. Muñoz Maniega, A.J. Storkey, M.D. King, M.E. Bastin & C.A. Clark (2011). TractoR: Magnetic resonance imaging and tractography with R. Journal of Statistical Software 44(8):1-18. http://www.jstatsoft.org/v44/i08/.
path.expand performs some of what
expandFileName does.