# NOT RUN {
 data <- forcats::gss_cat %>% dplyr::filter(year %in% c(2000, 2014))
tabs <-
  tab(data, relig, marital, c(year, race), pct = "row", totaltab = "no",
      color = "diff", tot = "row", rare_to_other = TRUE)
tabs %>%
  dplyr::select(year, race, relig, Married) %>%
  tab_spread(race)
  
# }
Run the code above in your browser using DataLab