View source: R/survey-helpers.R
collapse_parties | R Documentation |
Given a data frame containing multiple surveys (one row per survey), transforms the data into long format with one row per party.
collapse_parties(
surveys,
parties = c("cdu", "spd", "greens", "fdp", "left", "pirates", "fw", "afd", "others")
)
surveys |
A data frame with one survey per row. |
parties |
A character vector containing names of parties to collapse. |
Data frame in long format
## Not run:
emnid <- scrape_wahlrecht()
emnid.long <- collapse_parties(emnid)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.