infer: Infer

Description Usage Arguments Value Examples

View source: R/dist.R

Description

Infer a distribution from a collection of observed events.

Usage

1
infer(events)

Arguments

events

Numeric giving a collection of observed events.

Value

Dist object inferred from events.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
# Infer distributions from collected events
xs <- sample(0:1, 10, TRUE)
d  <- infer(xs)
dump(d)

xs      <- matrix(0, 10, 3)
xs[, 1] <- sample(0:1, 10, TRUE)
xs[, 2] <- sample(2:3, 10, TRUE)
xs[, 3] <- sample(0:2, 10, TRUE)
d  <- infer(xs)
dump(d)

rinform documentation built on April 1, 2018, 12:12 p.m.