build_filter {piwikproR} | R Documentation |
Build filter from tribble
Description
Build filter from tribble
Usage
build_filter(filters, global_operator = "and")
Arguments
filters |
tribble with columns
Possible values for operator:
|
global_operator |
"and" or "or" |
Value
filter json encoded to feed to build_query
Examples
filters <- tibble::tribble(
~column, ~operator, ~value,
"event_url", "matches", "Zamperoni",
"event_url", "matches", "-1[34]"
)
# With optional transformation
filters <- tibble::tribble(
~column, ~operator, ~value, ~transformation,
"event_url", "starts_with", "/medien", "to_path",
"event_url", "matches", "-1[34]", NULL
)
filters <- build_filter(filters, "and")
# If values of two or more different types are used use lists
filters <- tibble::tribble(
~column, ~operator, ~value,
"device_type", "eq", list(0),
"location_country_name", "eq", list("DE")
)
# This also works for transformation
[Package piwikproR version 0.4.0 Index]