union {probs}R Documentation

Union of Subsets Calculates the union of subsets of a probability space.

Description

Union of Subsets Calculates the union of subsets of a probability space.

Usage

union(x, ...)

Arguments

x

vectors, data frames, or ps objects containing a sequence of items (conceptually)

...

further arguments to be passed to or from other methods.

Details

This function operates row-wise on dataframes, and element-wise among the outcomes of ps objects. The elements of union(x,y) are those elements in x or y, or both. The definition is taken to match the version in the base package.

Value

A data frame or subset of a probability space of the same type as its arguments.

Author(s)

G. Jay Kerns gkerns@ysu.edu, based on a suggestion made by Brian Ripley in R-devel, 12/11/07.

Examples

S <- cards()
A <- subset(S, suit == "Heart")
B <- subset(S, rank == "A" )
union(A, B)

[Package probs version 0.9.9 Index]