count_path_segments {urlexplorer} | R Documentation |
Count occurrences of specific path segments at a given index
Description
Count occurrences of specific path segments at a given index
Usage
count_path_segments(path, segment_index, sort = FALSE, name = "n")
Arguments
path |
A character vector of paths. |
segment_index |
Index of the segment to count. |
sort |
Logical indicating whether to sort the output by count. Defaults to FALSE. |
name |
The name of the column containing the counts. Defaults to 'n'. |
Value
A tibble with each segment at the specified index and how often it occurs.
Examples
count_path_segments(c("/path/to/resource", "/path/to/shop"), 2)
[Package urlexplorer version 0.1.0 Index]