Re: [R] Empty Set In a Set

From: Duncan Murdoch <murdoch_at_stats.uwo.ca>
Date: Wed, 30 Apr 2008 06:59:05 -0400

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.



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. Received on Wed 30 Apr 2008 - 11:47:03 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Wed 30 Apr 2008 - 15:30:32 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.

list of date sections of archive