Can perform one of three rough conversions:

  1. For interval contracts (e.g., "220 - 229", "9% or more", etc.), convert the character strings to proper interval notation.

  2. For contracts with multiple discrete outcomes (e.g., Candidate names), convert the character vector to simple factors.

  3. For markets with a single binary question (e.g., "Will the Democrats have a brokered convention in 2020?"), contracts returned are always "Yes" which is converted to TRUE.

contract_convert(x, decimal = FALSE)



A character vector of contract names.


Should percentages be converted to decimals?


A interval factor, unique factor, or logical vector.