Try this using 'sapply'"
> sapply(X.new, all.equal, .2) == "TRUE"
[1] TRUE FALSE
On Wed, Aug 27, 2008 at 12:13 PM, David Afshartous
<[EMAIL PROTECTED]> wrote:
>
> Thanks. Is there simple way around this for simple checking of single
> values? The all.equal() mentioned in the FAQ doesn't seem
Thanks. Is there simple way around this for simple checking of single
values? The all.equal() mentioned in the FAQ doesn't seem appropriate.
X = c(1.2, 2)
> X.new = X -1
> X == 1.2
[1] TRUE FALSE
> X.new == .2
[1] FALSE FALSE
On 8/27/08 11:47 AM, "jim holtman" <[EMAIL PROTECTED]> wrote:
>
FAQ 7.31
On Wed, Aug 27, 2008 at 11:51 AM, David Afshartous
<[EMAIL PROTECTED]> wrote:
>
> All,
>
> I'm witnessing some strange behavior when checking the values of one of my
> variables. My guess is that it has something to do with the number of
> significant digits being represented, but perhap
All,
I'm witnessing some strange behavior when checking the values of one of my
variables. My guess is that it has something to do with the number of
significant digits being represented, but perhaps not as my variable was
created from other variables that only had one decimal place. See below.
4 matches
Mail list logo