[R] Variable Wildcard Value
Waclaw.Marcin.Kusnierczyk at idi.ntnu.no
Wed Apr 1 10:31:47 CEST 2009
Patrick Burns wrote:
> I would be truly amazed if the answer were "yes".
> I find this the most fascinating question on R-help
> for a long time, maybe ever. Can you tell us what
> you have in mind and what your ultimate purpose is?
this seems a request for a 'match all' value, somewhat the inverse of NA
(~'match nothing'). i could think of this being useful when you want to
check for duplicates, and want to mark that some entries (e.g., the
unknown ones) are irrelevant for the comparison (i.e., they should match
identical(c(1, NA), c(1, 2))
identical(c(1, NA), c(1, NA))
identical(c(1, *), c(1, 2))
identical(c(1, *), c(1, NA))
not sure about the last one, though, since the original post demanded
that is.na(*) == FALSE
i don't claim this would be useful in practice, just speculating.
> Patrick Burns
> patrick at burns-stat.com
> +44 (0)20 8525 0696
> (home of "The R Inferno" and "A Guide for the Unwilling S User")
> Francis Smart wrote:
>> Is there a wildcard value for vector values in r?
>> For instance:
>>> M <- *wildcard
>>> (M=="peanut butter")
> R-help at r-project.org mailing list
> PLEASE do read the posting guide
> and provide commented, minimal, self-contained, reproducible code.
More information about the R-help