Description Usage Arguments Value Examples
This function creates a new political group within EU Parliament that is a combination of other parties. This is done by summing the values in each line of several listed columns and then renames the column.
1 | newpoligroup(df, chosenparties, poligroupname, keep = c("Country", "Year"))
|
df |
The |
chosenparties |
The |
poligroupname |
The |
keep |
The columns of the inputted |
Returns a dataframe
with the columns inputted from argument keep
and an extra column with the sum of the columns listed in chosenparties
.
1 2 3 4 5 6 7 | Country <- c("Austria", "Belgium", "Bulgaria")
EPP <- c(1,2,3)
SD <- c(1,2,3)
Other <- c(1,1,1)
IN <- c(1,1,1)
df.data <- data.frame(Country, EPP, SD, Other, IN)
newpoligroup(df.data, chosenparties = c("EPP", "SD"), "traditional", keep = "Country")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.