Find Index of Tag in List of Tags
find_tag.Rd
Finds the index of a particular tag in a list of tags wherein the list might also contain vectors. This function helps to find row indices for later filtering functions.
Arguments
- tag_list
A list of strings or vectors of strings representing tasks' tags (with vectors for tasks with multiple tags).
- tag
Simple string of one tag to find in the
tag_list
.
Examples
todo <- c('x 2018-12-12 2018-12-10 x y z @home +list',
'(A) 2018-12-10 a b c @home @work',
'2018-12-12 def +list',
'a b c @context +list +project')
parse_tasks(todo) %>% filter(find_tag(context, '@home'))
#> Error in parse_tasks(todo) %>% filter(find_tag(context, "@home")): could not find function "%>%"