polls_filter: Select polls

Description Usage Arguments

View source: R/data_combine.R

Description

Filter polls based on k most recent by state or since a set date.

Usage

1
polls_filter(polls, method = "last_k", k = 5, since = today() - weeks(4))

Arguments

polls

data frame of polling results as returned by 'fivethirtyeight_update“

method

which method do we use to include polls: "last_k" includes the last 'k' polls, "since" includes polls as specified in 'since'.

k

include k most recent polls

since

date after which polls to include (based on 'date' or 'end_date').


heike/electionViz documentation built on Nov. 16, 2020, 10:02 p.m.