join_1col: Join with candidate data with single district identifier

View source: R/join_to_party.R

join_1colR Documentation

Join with candidate data with single district identifier

Description

For example, used for referenda where there is only one "seat"

Usage

join_1col(tbl, cand, vote_col, join_cols_tbl, join_cols_cand)

Arguments

tbl

A wide dataset with the contest

join_col

NSE code to indicate variable that is being joined (to ballot_name in cands)

type

NSE code for the contest. Will also be used to filter cand if not null.

...

geographic variables to segment on

#' This assumes that all rows inlcuded in tbl did have that election to choose and that the candidate table is complete; therefore NAs are coded to 0 (abstain).


kuriwaki/ballot documentation built on July 29, 2024, 11:10 a.m.