Description Usage Arguments Value Examples
View source: R/account_with_tag_parents.R
Adds a column called parent
to a table. This is the ID
of a tag's parent tag. Since tags can have multiple parents,
we need to know what the ultimate root parent to determine
"parenthood" is. This is done using the parent_id
parameter.
1 | with_tag_parents(tags, parent_id)
|
tags |
A tibble of tags to find parents for |
parent_id |
A root parent that all children are determined from |
The same tags tibble, but annotated with a parent
column
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 | # Add parents to tags
account("TEST01AA") %>%
tags() %>%
with_tag_parents(10)
# See what root brands we have
account("TEST01AA") %>%
topic_trees()
# Tag 1001 is a topic tree. Let's find
# topics, with parents, that are part of this tree.
account("TEST01AA") %>%
tags() %>%
with_tag_parents(1001) %>%
dplyr::filter(namespace == 'topic') %>%
dplyr::arrange(desc(is_parent), name)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.