format_market_data: Format bid and ask market data with HTML

Description Usage Arguments Value Examples

Description

Wrapper function to apply HTML formatting to 'PredictIt' market data. Can be displayed in a shiny app, or standalone in an htmlwidget (e.g. datatable).

Usage

1

Arguments

data

'PredictIt' market data, of class data.frame or tibble, as returned by all_markets() or tweet_markets().

Value

A tibble containing bid and ask data formatted with HTML tags and user-friendly column names.

Examples

1
2
3
4
5
## Only run this example in interactive R sessions
if (interactive()) {
    data <- all_markets()
    format_market_data(data)
}

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