Re: [Rd] NA and NaN in function identical

2007-08-29 Thread Prof Brian Ripley
On Wed, 29 Aug 2007, Petr Savicky wrote: > The help page for function identical says: > 'identical' sees 'NaN' as different from 'as.double(NA)', but all > 'NaN's are equal (and all 'NA' of the same type are equal). > However, we have > x <- NaN > y <- as.double(NA) > x # [1] NaN > y #

[Rd] NA and NaN in function identical

2007-08-29 Thread Petr Savicky
The help page for function identical says: 'identical' sees 'NaN' as different from 'as.double(NA)', but all 'NaN's are equal (and all 'NA' of the same type are equal). However, we have x <- NaN y <- as.double(NA) x # [1] NaN y # [1] NA identical(x,y) # [1] TRUE In my opinion,