glob: Wildcard globbing

View source: R/glob.R

globR Documentation

Wildcard globbing

Description

Helper function for globbing character vectors

Usage

glob(x, pattern = NULL, value = TRUE, ...)

Arguments

x

A vector of characters

pattern

Wildcard globbing pattern

value, ...

Additional parameters passed to grep. Note: value is by default TRUE; when NA, ... is passed to grepl.

Examples

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*")

mark documentation built on Oct. 23, 2023, 9:06 a.m.

Related to glob in mark...