marginal: Marginal Distributions

Description Usage Arguments Details Value Author(s) See Also Examples

Description

Computes the marginal distribution of a set of variables.

Usage

1
marginal(space, vars = NULL)

Arguments

space

a data frame probability space or a subset of one.

vars

an optional character vector of variable names in space.

Details

If vars is not specified, then marginal() will set vars to be all non-probs columns, which can be useful in the case that it is desired to aggregate duplicated rows.

Value

A data frame with a probs column.

Author(s)

G. Jay Kerns gkerns@ysu.edu.

See Also

See addrv for adding random variables to a data frame probability space.

Examples

1
2
S <- rolldie(3, makespace = TRUE)
marginal(S, vars = c("X1", "X2"))

aflaherty13/prob documentation built on May 28, 2019, 4:42 p.m.