Skip to content
Prev 304082 / 398513 Next

ifelse problem - bug or operator error

On Fri, Aug 24, 2012 at 3:22 PM, Jennifer Sabatier
<plessthanpointohfive at gmail.com> wrote:
You probably should have: dput() makes it super easy as well.
Indeed it makes no sense to me either because you sent HTML email
which got mangled by the server.
First guess.... standard problems with equality of floating point
numbers. (See R FAQ 7.31 for the details)

You probably want to change

x == 1

to

abs(x - 1) < 1e-05

or something similar.

Cheers,
Michael