get_election_result: Get an election result from a pollyvote object

Description Usage Arguments Value Examples

View source: R/get_functions.R

Description

Get an election result from a pollyvote object

Usage

1
get_election_result(pv, election_date, election_name)

Arguments

pv

[pollyvote]
The pollyvote object from which to get the election result.

election_date[date(1)]

Election date by which to get the election result.

election_name[character(1)]

Election name by which to get the election result.

gets an election result from a pollyvote object. To add a new election result to a pollyvote object use add_election_result.

If election_date and election_result are missing, whole data for elections is returned.

Value

A data frame containing the election result.

Examples

1
2
3
4
5
pv = create_pollyvote(perm_countries = "D")
data("election_result")
pv = add_election_result(pv, "BTW 2013", election_result)
get_election_result(pv, election_date = "2013-09-22")
get_election_result(pv, election = "BTW 2013")

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