To define the fact to be consulted, its name is indicated, optionally, a vector of names of selected measures and another of aggregation functions are also indicated.
Usage
select_fact(dq, name = NULL, measures = NULL, agg_functions = NULL)
# S3 method for class 'dimensional_query'
select_fact(dq, name = NULL, measures = NULL, agg_functions = NULL)
Details
If the name of any measure is not indicated, only the one corresponding to the number of aggregated rows is included, which is always included.
If no aggregation function is included, those defined for the measures are considered.
See also
Other query functions:
dimensional_query()
,
filter_dimension()
,
run_query()
,
select_dimension()
Examples
dq <- dimensional_query(ms_mrs) |>
select_fact(
name = "mrs_age",
measures = c("n_deaths"),
agg_functions = c("MAX")
)
dq <- dimensional_query(ms_mrs) |>
select_fact(name = "mrs_age",
measures = c("n_deaths"))
dq <- dimensional_query(ms_mrs) |>
select_fact(name = "mrs_age")