R/utils_path.R
starts_with_parts.Rd
Do Subfolder List Elements Start with Given Folder Names?
starts_with_parts(parts, elements)
parts | list of list of character as returned by
|
---|---|
elements | vector of character giving the sequence of strings to be
found in |
vector of logical as long as parts
containing TRUE
at
positions i
for which all(parts[[i]][seq_along(elements)] ==
elements)
is TRUE
#> [1] TRUE TRUE FALSE#> [1] FALSE FALSE TRUEsubdir_matrix <- kwb.file::to_subdir_matrix(parts) starts_with_parts(subdir_matrix, elements = c("a", "b"))#> [1] TRUE TRUE FALSE#> [1] FALSE FALSE TRUE