# setdiff

From prob v1.0-1
by G. Jay Kerns

##### Set Difference of Subsets

Calculates the (nonsymmetric) set difference of subsets of a probability space.

- Keywords
- misc

##### Usage

`setdiff(x, …)`# S3 method for default
setdiff(x, y, …)

# S3 method for data.frame
setdiff(x, y, …)

# S3 method for ps
setdiff(x, y, …)

##### Arguments

- x, y
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 `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.

##### See Also

##### Examples

```
# NOT RUN {
S <- cards()
A <- subset(S, suit == "Heart")
B <- subset(S, rank == "A" )
setdiff(B, A)
# }
```

*Documentation reproduced from package prob, version 1.0-1, License: GPL (>= 3)*

### Community examples

Looks like there are no examples yet.