add_data.pollyvote: add data to a pollyvote object

Description Usage Arguments Value Examples

Description

Adds data to a pollyvote opbject.

Usage

1
2
## S3 method for class 'pollyvote'
add_data(pv, newdata = data.frame(), ...)

Arguments

pv

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

newdata

[data.frame]
the data to add to the pollyvote object. should contain this columns: id, date, source, party, percent

...

additional arguments giving information about newdata.

Value

The pollyvote object with added data.

Examples

1
2
3
data("polls_individual")
pv = add_data(pv, newdata = polls_individual, country = "D", 
              region = "national", source_type = "poll", election = "BTW")

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