R/post_process_data.R

Defines functions limit_years_of_data

limit_years_of_data <- function(.data, dots_params) {
  if (is.null(.data)|| isFALSE(.data)) {
    return(null)
  }

  .data <- .data %>% dplyr::filter(date >= dots_params$start_date)
  if (!is.null(dots_params$end_date)) {
    .data <- .data %>% dplyr::filter(date < dots_params$end_date)
  }
  .data
}

Try the Rapi package in your browser

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

Rapi documentation built on May 29, 2024, 2:34 a.m.