starschemar (version 1.2.0)

select_dimension: Select dimension

Description

To add a dimension in a dimensional_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(dq, name = NULL, attributes = NULL)

# S3 method for dimensional_query select_dimension(dq, name = NULL, attributes = NULL)

Arguments

dq

A dimensional_query object.

name

A string, name of the dimension.

attributes

A vector of attribute names.

Value

A dimensional_query object.

See Also

Other query functions: dimensional_query(), filter_dimension(), run_query(), select_fact()

Examples

Run this code
# NOT RUN {
library(tidyr)

dq <- dimensional_query(ms_mrs) %>%
  select_dimension(name = "where",
                  attributes = c("city", "state")) %>%
  select_dimension(name = "when")

# }

Run the code above in your browser using DataLab