infer_topics | R Documentation |
Determines the top-tier (tier = 1L
) or second-tier (tier = 2L
) topics corresponding to topics
in the
hierarchy, i.e. either topics
themselves or their (grand)parent topics.
infer_topics(topics, tier = 1L)
topics |
Topics from which the corresponding (grand)parent topics are to be determined. A factor or character vector. |
tier |
Tier of the inferred topics. Either |
A character vector.
Other referendum topic functions:
data_topics
,
hierarchize_topics()
,
hierarchize_topics_fast()
,
topics()
rdb::infer_topics(topics = c("EU", "animal protection"),
tier = 1L)
rdb::infer_topics(topics = c("EU", "animal protection"),
tier = 2L)
# topics of different tiers can mixed in `topics`
rdb::infer_topics(topics = c("EU", "environment"),
tier = 2L)
# but `topics` of a higher tier than `tier` will be ignored
rdb::infer_topics(topics = "foreign policy",
tier = 2L)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.