Learn R Programming

urlexplorer (version 0.1.0)

extract_path_segment: Extract a specific segment from a path

Description

Extract a specific segment from a path

Usage

extract_path_segment(path, segment_index)

Value

A character vector containing the specified segment from each path.

Arguments

path

A character vector of paths.

segment_index

The index of the segment to extract.

Examples

Run this code
extract_path_segment(c("/path/to/resource", "/another/path/"), 2)

Run the code above in your browser using DataLab