deal_to_df: Convert deal to dataframe representation

Description Usage Arguments Value Examples

View source: R/utils.R

Description

Convert deal to dataframe representation

Usage

1
deal_to_df(a, names_to = "g")

Arguments

a

deal

names_to

column name for placing gamble identifiers

Value

dataframe with 3 columns: gamble number, outcome and corresponding probability.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
a <- list(
  data.frame(
    x=c(5e5,0),
    p=c(0.11,0.89)),
  data.frame(
    x=c(2.5e6,0),
    p=c(0.10,0.90))
)

deal_to_df(a)

dmi3kno/deals documentation built on Dec. 11, 2019, 12:07 p.m.