Fetches the topics that are used in an account, or those that appear on a tibble of mentions.

# S3 method for brandseyer2.account
topics(x, ...)

# S3 method for list
topics(x, ...)

# S3 method for data.frame
topics(x, ..., ac = attr(x, "account"), na.rm = TRUE)

topics(x, ...)

Arguments

x

Objects to return topic data from.

...

Additional arguments for other methods.

ac

An optional account object from which to take topic information.

na.rm

Whether to remove mentions that have no topics.

Value

A tibble of topic information. Includes the name and topic description.

Methods (by class)

  • brandseyer2.account: Get topics for a single account.

  • list: Get topics for a list of accounts

  • data.frame: Fetch topic information from a tibble of mention data.

Examples

account("TEST01AA") %>% topics()
#> # A tibble: 3 x 8 #> id name namespace description deleted forClassificati… children is_parent #> <int> <chr> <chr> <chr> <lgl> <lgl> <list> <lgl> #> 1 10 Paren… topic Has childr… FALSE FALSE <int [2… TRUE #> 2 11 Child… topic I am a chi… FALSE FALSE <NULL> FALSE #> 3 12 Child… topic I am also … FALSE FALSE <NULL> FALSE
accounts(c("TEST01AA", "TEST02AA")) %>% topics()
#> # A tibble: 6 x 9 #> account id name namespace description deleted forClassificati… children #> <chr> <dbl> <chr> <chr> <chr> <lgl> <lgl> <list> #> 1 TEST01AA 10 Paren… topic Has children FALSE FALSE <int [2… #> 2 TEST01AA 11 Child… topic I am a child FALSE FALSE <NULL> #> 3 TEST01AA 12 Child… topic I am also a… FALSE FALSE <NULL> #> 4 TEST02AA 1010 Paren… topic Has children FALSE FALSE <dbl [2… #> 5 TEST02AA 1011 Child… topic I am a child FALSE FALSE <NULL> #> 6 TEST02AA 1012 Child… topic I am also a… FALSE FALSE <NULL> #> # … with 1 more variable: is_parent <lgl>