set_data: set data

Description Usage Arguments Value Examples

Description

This function completely overwrites the data from a pollyvote container. Do not use unless you are sure that this is what you want.

Usage

1
set_data(pv, newdata)

Arguments

pv

[pollyvote(1)]
the pollyvote object of which to overwrite the data from.

newdata

[data.frame]
the data to replace the original data contained in pv.

Value

pollyvote object containing the new data.

Examples

1
2
3
pv = create_pollyvote()
# returns an empty data frame
set_data(pv, newdata = data.frame(country = "D", election = "BTW"))

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