powered by
Helper function for globbing character vectors
glob(x, pattern = NULL, value = TRUE, ...)
A vector of characters
Wildcard globbing pattern
Additional parameters passed to grep. Note: value is by default TRUE; when NA, ... is passed to grepl.
grep
value
TRUE
NA
...
grepl
x <- c("apple", "banana", "peach", "pear", "orange") glob(x, "*e") glob(x, "pea*", value = FALSE) glob(x, "*an*", value = NA) path <- system.file("R", package = "mark") glob(list.files(path), "r*")
Run the code above in your browser using DataLab