R/09-print_two_year_summary.R

Defines functions .print_two_year_summary

#' Prints question summary for two years
#'
#' @param question_summary data.frame, summarises selected question
#' @noRd
#'
.print_two_year_summary <- function(question_summary) {
  message(paste(
    "This questions was asked in",
    paste(question_summary$year, collapse = " and ")
  ))
  for (i in seq_len(nrow(question_summary))) {
    message(paste(
      "In", question_summary$year[i],
      "it was asked in", question_summary$n[i],
      "of the selected geographies"))
  }
}

Try the worldriskpollr package in your browser

Any scripts or data that you put into this service are public.

worldriskpollr documentation built on April 3, 2023, 5:41 p.m.