Sorry if this has been answered elsewhere, but I can't find any discussion of 
it.

Wondering why the following situation occurs (duplicated on 3.2.2 CentOS6 and 
3.0.1 Win2k, so I don't think it is a bug):

> sapply(1, identical, 1)
[1] TRUE

> sapply(1:2, identical, 1)
[1] FALSE FALSE

> sapply(1:2, function(i) identical(as.numeric(i),1) )
[1]  TRUE FALSE

> sapply(1:2, function(i) identical(as(i,"numeric"),1) )
[1] FALSE FALSE

I have been unable to find anything different about the versions of "1" that 
identical() is not finding identical.

Thanks,
Ariel



        [[alternative HTML version deleted]]

______________________________________________
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to