Check if all elements of x are also contained in y. This is equivalent
to testing whether setdiff(x, y) is empty.
Value
A logical scalar. Returns TRUE if x is a subset of y, i.e. all
elements of x are also elements of y. Returns FALSE otherwise.
Details
If
xis empty, the result is alwaysTRUE(the empty set is a subset of any set).If
yis empty andxis not, the result isFALSE.Duplicates in
xare ignored; only set membership is tested.NAvalues are treated as ordinary elements. In particular,NAinxis considered a subset element only ifNAis also present iny.
