getParentDirectory-character-method: Get Path of Parent Directory (Vectorized)

Description Usage Arguments Value Note Author(s) References See Also Examples

Description

See generic: getParentDirectory.

Usage

1
2
## S4 method for signature 'character'
getParentDirectory(path, up = 1, ...)

Arguments

path

character. Dimension: any. Paths of file system ressources.

up

numeric. Dimension: 1 Number of levels to go up (relative to the initial directory).

...

Further arguments to be passed to subsequent functions/methods.

Value

character. A vector containing paths of parent directories based on up.

Note

The function is multi-vectorized: arguments x and up (see mapply.

Author(s)

Janko Thyson janko.thyson@rappster.de

References

https://github.com/Rappster/filesystr

See Also

getParentDirectory

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
## Not run: 

path <- c(getwd(), R.home())

getParentDirectory(path = path)
getParentDirectory(path = path, up = 2)
getParentDirectory(path = path, up = 3)
getParentDirectory(path = path, up = c(1,4))

path <- "c:/Windows"
getParentDirectory(path = path, up = 2)
try(getParentDirectory(path = path, up = 3))


## End(Not run)

rappster/filesystr documentation built on May 26, 2019, 11:17 p.m.