add_aggr_source_type: add an aggregation function to a pollyvote object

Description Usage Arguments Value

Description

Adds an aggregation function to a pollyvote object. An aggregation function is a special type of a prediction function.

Usage

1
2
add_aggr_source_type(pv, method, which_source_type, agg_fun = "mean",
  na_handle = "last", ...)

Arguments

pv

[pollyvote]
the pollyvote object to add the data to.

method

[character(1)]
method of the prediction. This method name will be used to call the prediction in predict.pollyvote.

which_source_type

[character(n)]
character vector of arbitrary length containing the source_types over which to aggregate.

agg_fun

[character(1)]
string indicating which aggregation function to use. Currently implemented are 'mean' and 'median'.

na_handle

[character(1)]
string indicating which aggregation function to use. Currently implemented are 'na.rm', indicating that missing observations will be ignored and all other functions will be aggregated and TODO.

...

additional arguments

Value

The pollyvote object with added prediction


pollyvote/pollyvoter documentation built on May 25, 2019, 11:23 a.m.