This provides easy access to metric information stored in the metric column of a tibble returned by sections() and dashboards(). It essentially uses tidyr::unnest_legacy() to clean up the table.

metrics(x, m, ...)

# S3 method for data.frame
metrics(x, m, collapse = TRUE, ...)

Arguments

x

The tibble to pull widget information from.

m

An optional filter for selecting metrics. A numeric vector allows you to choose metrics with the given IDs. A character vector allows you to choose metrics with matching captions.

...

Parameters for other methods.

collapse

A logical value indicating whether columns should be removed (collapsed) or not.

Value

An unnested table of metrics.

Details

This provides an additional field not available in the original metric information called filter. This indicates the filter that the metric would have used to call information from the BrandsEye API, and is a combination of the section and metric filters.

Methods (by class)

  • data.frame: Expand metric information for data frames.

See also

dashboards() to pull dashboard information for an account.

sections() to pull section information for an account.