Generic function to filter issues with labels
with_labels(x, ...)
# S3 method for class 'IssuesTB'
with_labels(x, ...)An object of class IssuesTB.
Arguments passed on to base::grepl
patterncharacter string containing a regular expression
(or character string for fixed = TRUE) to be matched
in the given character vector. Coerced by
as.character to a character string if possible. If a
character vector of length 2 or more is supplied, the first element
is used with a warning. Missing values are allowed except for
regexpr, gregexpr and regexec.
x,texta character vector where matches are sought, or an
object which can be coerced by as.character to a character
vector. Long vectors are supported.
ignore.caselogical. if FALSE, the pattern matching is case
sensitive and if TRUE, case is ignored during matching.
perllogical. Should Perl-compatible regexps be used?
valuelogical. If FALSE, a vector containing the (integer)
indices of the matches determined by grep is returned, and if
TRUE, a vector containing the matching elements themselves is
returned.
fixedlogical. If TRUE, pattern is a string to be
matched as is. Overrides all conflicting arguments.
useByteslogical. If TRUE the matching is done
byte-by-byte rather than character-by-character. See
‘Details’.
invertlogical. If TRUE return indices or values for
elements that do not match.
replacementa replacement for the matched pattern in sub and
gsub. Coerced to character if possible. For
fixed = FALSE this can include backreferences "\1" to
"\9" to parenthesized subexpressions of pattern. For
perl = TRUE only, it can also contain "\U" or
"\L" to convert the rest of the replacement to upper or
lower case and "\E" to end case conversion. If a
character vector of length 2 or more is supplied, the first element
is used with a warning. If NA, all elements in the result
corresponding to matches will be set to NA.
An object IssuesTB with issues that satisfy the condition.
issues_selector <- init_selector(
source = "Local",
dataset_dir = system.file("data_issues", package = "IssueTrackeR"),
dataset_name = NULL
)
my_issues <- get_issues(selector = issues_selector)
#> The issues will be read from /home/runner/work/_temp/Library/IssueTrackeR/data_issues/list_issues.yaml.
with_labels(my_issues, pattern = "Bug")
#> No issues
#>