kpi_grp_search {rKolada} | R Documentation |
Search a Kolada KPI Group metadata table for group names
Description
Search a Kolada KPI Group metadata table. Only keep rows that
contain the search query. Searches group titles and group IDs. Note that this
function does not search for individual KPIs contained within KPI groups!
To search for KPIs within a KPI group, see examples below for an example
using kpi_grp_unnest
.
Usage
kpi_grp_search(kpi_grp_df, query)
Arguments
kpi_grp_df |
A Kolada KPI Group metadata table, as created by e.g.
|
query |
A search term or a vector of search terms to filter by. Case insensitive. |
Value
A Kolada KPI Group metadata table
Examples
if (kolada_available()) {
kpi_grp_df <- get_kpi_groups()
# Which KPI groups match the keyword "ekonomi" (economy)?
kpi_grp_df %>% kpi_grp_search("ekonomi")
# Which KPI groups contain KPIs matching the keyword "arbete" (work/labour)?
kpi_grp_df %>%
kpi_grp_unnest() %>%
kpi_search("arbete") %>%
dplyr::count(group_title, sort = TRUE)
}
[Package rKolada version 0.2.3 Index]