swing | R Documentation |
This convenience function takes two numeric vectors of vote share data and returns the estimated two-party swing.
swing(a1, a2, b1, b2, type = "butler")
a1 |
Party A vote share at time 1. |
a2 |
Party A vote share at time 2. |
b1 |
Party B vote share at time 1. |
b2 |
Party B vote share at time 2. |
type |
Which swing calculation to use. Either "butler" or "steed". Defaults to "butler". |
## Not run:
swing(a1 = .5, a2 = .4, b1 = .5, b2 = .6, type = "butler")
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.