setdiff.default {probs} | R Documentation |
Set Difference of Subsets Calculates the (nonsymmetric) set difference of subsets of a probability space.
Description
Set Difference of Subsets Calculates the (nonsymmetric) set difference of subsets of a probability space.
Usage
## Default S3 method:
setdiff(x, y, ...)
Arguments
x |
vectors, data frames, or |
y |
vectors, data frames, or |
... |
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 setdiff(x,y)
are those elements in x
but not in y
. 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, essentially verbatim from a suggestion made by Brian Ripley on R
-devel, 12/11/07
See Also
Examples
S <- cards()
A <- subset(S, suit == "Heart")
B <- subset(S, rank == "A" )
setdiff(B, A)
[Package probs version 0.9.9 Index]