# NOT RUN {
library(tidyr)
st <- star_schema(mrs_age, dm_mrs_age) %>%
role_playing_dimension(
dim_names = c("when", "when_available"),
name = "When Common",
attributes = c("Date", "Week", "Year")
)
st <- star_schema(mrs_cause, dm_mrs_cause) %>%
role_playing_dimension(
dim_names = c("when", "when_received", "when_available"),
name = "when_common",
attributes = c("date", "week", "year")
)
# }
Run the code above in your browser using DataCamp Workspace