brands: Fetch brand information

Description Usage Arguments Value Methods (by class) Author(s) See Also Examples

View source: R/brands.R

Description

Fetches brand information for accounts and for mention data. This is returned returned as a tibble. For account objects, this returns the brands that make up the account. For mention data, this returns the brands that are associated with the mention.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
## S3 method for class 'brandseyer2.account'
brands(x, ..., short = TRUE)

## S3 method for class 'list'
brands(x, ..., short = TRUE)

brands(x, ...)

## S3 method for class 'data.frame'
brands(x, ..., ac = attr(x, "account"))

Arguments

x

An object to fetch brand data for, such as an account() or tibble of mention data.

...

Additional parameters for functions.

short

Only show the most important brand information.

ac

An optional account object from which to take brand information.

Value

A tibble of brand information

Methods (by class)

Author(s)

Constance Neeser

See Also

root_brands() for filtering to only the root brands of an account.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
# Fetch brand information
account("TEST01AA") %>%
  brands()

# Find deleted parent brands
account("TEST01AA") %>%
  brands() %>%
  dplyr::filter(is.na(parent), deleted)

# Fetch phrases without using `phrases``
account("TEST01AA") %>%
  brands(short = FALSE) %>%
  dplyr::select(id, phrases) %>%
  dplyr::rename(brand.id = id) %>%
  tidyr::unnest_legacy(phrases) %>%
  dplyr::rename(phrase.id = id)

accounts(c("TEST01AA", "TEST02AA")) %>%
  brands()

# Finding the brands and sub-brands that mentions matched.
account("TEST01AA") %>%
  mentions("published inthelast week") %>%
  brands()

brandseye/brandseyer2 documentation built on Sept. 5, 2021, 2:15 p.m.