Learn R Programming

modiscloud (version 0.14)

extract_fn_from_path: Get the filename from a path

Description

The filename is split on slashes, and the last item is taken; this should be just the filename.

Usage

extract_fn_from_path(fn_with_path)

Arguments

fn_with_path
The filename, with partial or full path

Value

fn The extracted filename

See Also

strsplit

Examples

Run this code
fn_with_path = "/Library/Frameworks/R.framework/Versions/2.15/Resources/library/modiscloud/extdata/2002raw/MYD35_L2.A2002185.1910.005.2007206043609.hdf"
extract_fn_from_path(fn_with_path)

Run the code above in your browser using DataLab