[R] R match - could be improved ?

2015-03-15 Thread Jeremy Clark
​Dear All, The following gives a very unpleasant experience with apparently random NAs - probably it's my bad formatting of the coding - but the effect is unexpected and if undetected can lead to considerable problems: myvector1 = NULL myvector3 = NULL myvector4 = NULL myvector5 = NULL

Re: [R] R match - could be improved ?

2015-03-15 Thread Jeff Newmiller
This list is a plain text list. Posting in HTML frequently leads to corrupted code on the receiving end. Be sure to read the Posting Guide. In no programming language is it a good idea to assume equality with floating point values. See FAQ 7.31. In cases like this use integers to create

Re: [R] R match - could be improved ?

2015-03-15 Thread Michael Dewey
Dear Jeremy The NAs do not seem random to me as the gaps between successive NAs are either 3, 8 or 11. Have you considered the possibility that the finite precision of real numbers in computers may be the issue here? On 15/03/2015 11:04, Jeremy Clark wrote: ​Dear All, The following gives

Re: [R] R match - could be improved ?

2015-03-15 Thread J Robertson-Burns
I believe that you are in Circle 1 of The R Inferno. http://www.burns-stat.com/documents/books/the-r-inferno/ Pat On 15/03/2015 11:04, Jeremy Clark wrote: ​Dear All, The following gives a very unpleasant experience with apparently random NAs - probably it's my bad formatting of the coding -