On Wednesday 08 October 2003 11:27, Thomas Bock wrote:...
...I can not understand why the expression in
the subject does not work correct: > dcrn[which(fn == inve[2])]
numeric(0)
> inve[2]
[1] 406.7
1.) `==' comparisons have a certain tolerance 2.) the print output is not necessarily "precisely" your number
Instead of using `==' you should use a comparison with a certain tolerance you can specify...
I usually specify...
tol <- sqrt(.Machine$double.eps) dcrn[(fn - inve[2]) < tol]
See ?.Machine for details.
Cheers
Jason -- Indigo Industrial Controls Ltd. http://www.indigoindustrial.co.nz 64-21-343-545 [EMAIL PROTECTED]
______________________________________________ [EMAIL PROTECTED] mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help