sections: Give section information for a dashboard

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

View source: R/dashboard_sections.R

Description

Given a tibble of dashboard information (from, for example, dashboards()), this adds the section information to the tibble.

Usage

1
2
3
4
sections(x, d, unnest, ...)

## S3 method for class 'data.frame'
sections(x, d, unnest = FALSE, ..., .show.progress = interactive())

Arguments

x

A tibble to get section information for.

d

An optional value to filter the sections on. Can be a vector of integer IDs for the wanted sections, or a vector of characters giving words to perform partial string matches on section titles with.

unnest

A logical value indicating whether sections should be appended as a list of tibbles, or whether they should be unnested in to the tibble itself, similar to having called tidyr::unnest_legacy().

...

Parameters for other methods

.show.progress

Whether to show a progress bar. By default, it will only show a progress bar if there are more than 5 sections being fetched, and the session is interactive.

Get section information for a dashboard tibble.

Details

The second argument to this function, d, lets you search for specific mentions in a similar way that dashboards() does for dashboards. See the dashboards() documentation for more details.

Value

The original tibble, but now with an additional section column.

Methods (by class)

See Also

dashboards() to pull dashboard information for an account.

metrics() to pull metric information for sections.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
## Not run: 

# Get all sections for the dashboard with ID 1
account("TEST01AA") %>%
  dashboards(1) %>%
  sections()

# Get the section with ID 5 for the dashboard with ID 1
account("TEST01AA") %>%
  dashboards(1) %>%
  sections(5)

# Get the sections whose title contain the string "where"
account("TEST01AA") %>%
  dashboards(1) %>%
  sections("where")

## End(Not run)

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