filter_dimension | R Documentation |
Allows you to define selection conditions for dimension rows.
filter_dimension(sq, name, ...)
## S3 method for class 'star_query'
filter_dimension(sq, name = NULL, ...)
sq |
A |
name |
A string, name of the dimension. |
... |
Conditions, defined in exactly the same way as in |
Conditions can be defined on any attribute of the dimension (not only on
attributes selected in the query for the dimension). The selection is made
based on the function dplyr::filter
. Conditions are defined in exactly the
same way as in that function.
A star_query
object.
Other query functions:
as_GeoPackage()
,
as_geolayer()
,
get_layer()
,
get_variable_description()
,
get_variables()
,
run_query()
,
select_dimension()
,
select_fact()
,
set_layer()
,
set_variables()
,
star_query()
sq <- mrs_db |>
star_query() |>
filter_dimension(name = "when", week <= " 3") |>
filter_dimension(name = "where", city == "Cambridge")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.