initial_prediction_pollyvote: initial pollyvote prediction

Description Usage Arguments Value

View source: R/initial_pollyvote_functions.R

Description

internal function which initializes the prediction function of method pollyvote. This function aggregates the daat in two steps: In the first step all predictions from sources of the same source_types are aggregated daily. In the second step the aggregated source_types are aggregated, resulting in one prediction per day and party.

Usage

1
2
initial_prediction_pollyvote(pv, time_int = NULL, agg_fun = "mean",
  na_handle = "last", ...)

Arguments

pv

[pollyvote]
the pollyvote object of which to get the prediction data from.

agg_fun

[character(1)]
the name of the aggregation function to use, currently 'mean' and 'median' are supported

na_handle

[character(1)]
specifies how NA values are handled in the data.

...

[list()]
additional arguments, currently ignored.

time_int[date]

the time interval for which the prediction.

Value

data frame containing predictions for a parties in the days before the election


pollyvote/pollyvoter documentation built on April 4, 2018, 8:18 p.m.