Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

getParent

Gets the string of the parent specified by this pathname


Description

Gets the string of the parent specified by this pathname. This is basically, by default the string before the last path separator of the absolute pathname.

Usage

## Default S3 method:
getParent(pathname, depth=1L, fsep=.Platform$file.sep, ...)

Arguments

pathname

A character string of the pathname to be checked.

depth

An integer specifying how many generations up the path should go.

fsep

A character string of the file separator.

...

Not used.

Value

Returns a character string if the parent exists, otherwise NULL.

Author(s)

Henrik Bengtsson


R.utils

Various Programming Utilities

v2.10.1
LGPL (>= 2.1)
Authors
Henrik Bengtsson [aut, cre, cph]
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.