add_election_result.pollyvote: add an election result to a pollyvote object

Description Usage Arguments Value Examples

Description

Adds election result to a pollyvote opbject. The election date must be in format "

Usage

1
2
## S3 method for class 'pollyvote'
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)

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