[R] Empty Set In a Set
Duncan Murdoch
murdoch at stats.uwo.ca
Wed Apr 30 12:59:05 CEST 2008
On 29/04/2008 9:39 PM, Jason Q. McClintic wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA256
>
> Dear List:
>
> I'm looking for a form of the empty set such that if ES is said
> representation,
>
> ~ ES %in% c(1,2,3)
>
> evaluates to TRUE.
%in% is a vector operator, checking each element of ES and returning a
vector result. It sounds like you want a subset test, i.e. to check
that all the results are TRUE,
all(ES %in% c(1,2,3))
which returns TRUE when ES is empty.
Duncan Murdoch
>
> Thank you in advance for your assistance.
>
> Sincerely,
>
> Jason Q. McClintic
> - --
> Jason Q McClintic
> UST MB 1945
> 2115 Summit Avenue
> St. Paul, MN 55105
> jqmcclintic at stthomas.edu
> mccl0219 at tc.umn.edu
>
> "It is insufficient to protect ourselves with laws, we must protect
> ourselves with mathematics."--Bruce Schneier
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.6 (GNU/Linux)
> Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
>
> iQEVAwUBSBfN5hMtGNvij6jtAQgx3gf7Bxmht6ODCjsvhuFPkW1QWC1ey/ygVW9m
> uuwNZVCz2hBNDSV2NktaOHe+hl3sEj4gmxv0Q6onf4Opg59o9OQ1EtaeY13S/ouk
> EIO2fERY7VQcFbqjr1SnhlXGfyjX5bLk0ipFlqd11R+yXzFxzbafDtfcfKP+sp59
> CQ8uZ2wAshPgrN5ZHIrg8RpBEWUnjH19iS4vDr40IrYyVbFLSnT1XM+D3kaMHgtc
> oEi3wldigmSllX8KGVVp7DeXbEvUdrvsJgF1VLG/R8EFlMMHUVE1OD3d8SJ+y9Wh
> SuVqWcL+aFXqJvjpQsQaE/2ywk8mis+46EjX1zcYKHPyoIoeqv4OdQ==
> =tBx1
> -----END PGP SIGNATURE-----
>
> ______________________________________________
> R-help at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
More information about the R-help
mailing list