BoxModel: Defines a probability space from a box model.

Description Usage Arguments Value

View source: R/probability_space.R

Description

Defines a probability space from a box model.

Usage

1
2
BoxModel(box, size = 1, replace = TRUE, probs = NULL,
  order_matters = TRUE)

Arguments

box

(vector or list): The box to sample from. The box can be specified either directly as a list of objects or indirectly as a dict of objects and their counts.

size

(int): How many draws to make.

replace

(bool): Sample with replacement or without?

probs

(vector): Probabilities of sampling each ticket (by default, all tickets are equally likely). Note that this is ignored if box is specified as a list.

order_matters

(bool): Should we count different orderings of the same tickets as different outcomes? Essentially, this determines whether the draws are sorted before returning or not.

Value

A BoxModel


hayate0304/Rsymbulate documentation built on May 17, 2019, 8:20 a.m.