historical_plot: Plot historical contract data obtained from the 'PredictIt'...

historical_plotR Documentation

Plot historical contract data obtained from the 'PredictIt' website

Description

Function to make an interactive dygraphs::dygraph plot of historical contract data.

Usage

historical_plot(contract_data)

Arguments

contract_data

Named list containing contract name and data of class xts, as returned by parse_historical_csv().

Value

Interactive dygraphs::dygraph plot containing time series data for contract 'close' prices.

Examples

filename <- "What_will_be_the_balance_of_power_in_Congress_after_the_2020_election.csv"
csv_path <- system.file("extdata", filename, package = "rpredictit")
contract_data <- parse_historical_csv(csv_path)
historical_plot(contract_data)


danielkovtun/predictit documentation built on July 23, 2022, 9:28 p.m.