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

Description Usage Arguments Value Examples

Description

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

Usage

1
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

1
2
3
4
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)

rpredictit documentation built on March 26, 2020, 8:26 p.m.