get_eligible: Extract surveys from institutes within a specified...

View source: R/pooling.R

get_eligibleR Documentation

Extract surveys from institutes within a specified time-window

Description

Extract surveys from institutes within a specified time-window

Usage

get_eligible(
  surveys,
  pollsters,
  last_date = Sys.Date(),
  period = 14,
  period_extended = NA
)

Arguments

surveys

A tibble containing survey results for multiple pollsters as returned by get_surveys.

pollsters

Character vector of pollsters that should be considered for pooling.

last_date

Only surveys in the time-window from last_date to last_date - period will be considered for each pollster. Defaults to current date.

period

See last_date argument.

period_extended

Optional. If specified, all surveys in the time-window from last_date - period_extended to last_date - period will also be considered for each pollster, but only after down-weighting them by halving their true sample size.


coalitions documentation built on Aug. 17, 2022, 5:07 p.m.