Learn R Programming

rolap (version 2.5.1)

select_dimension: Select dimension

Description

To add a dimension in a star_query object, we have to define its name and a subset of the dimension attributes. If only the name of the dimension is indicated, it is considered that all its attributes should be added.

Usage

select_dimension(sq, name, attributes)

# S3 method for star_query select_dimension(sq, name = NULL, attributes = NULL)

Value

A star_query object.

Arguments

sq

A star_query object.

name

A string, name of the dimension.

attributes

A vector of attribute names.

See Also

Other query functions: as_GeoPackage(), as_geolayer(), filter_dimension(), get_layer(), get_variable_description(), get_variables(), run_query(), select_fact(), set_layer(), set_variables(), star_query()

Examples

Run this code

sq <- mrs_db |>
  star_query() |>
  select_dimension(name = "where",
                  attributes = c("city", "state")) |>
  select_dimension(name = "when")

Run the code above in your browser using DataLab