add_election_result: add election results (to a pollyvote object)

Description Usage Arguments Value Examples

View source: R/add_election_result.R

Description

Adds an election result, so far only implemented for pollyvote objects.

Usage

1
add_election_result(pv, election, data, ...)

Arguments

pv

[pollyvote]
the pollyvote object to add the election results to.

election

[character(1)]
name of the election. One of the permitted elections of pv.

data

[data.frame()]
data frame containing the election results in the long format.

...

currently ignored.

Value

The pollyvote object with added prediction.

Examples

1
2
3
pv = create_pollyvote(perm_countries = "D") 
data("election_result")
pv = add_election_result(pv, "BTW 2013", election_result, date = "2013-09-22")

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