[R] Unexpected behaviour of identical

Swinton, Jonathan Jonathan.Swinton at astrazeneca.com
Mon Apr 19 17:20:09 CEST 2004


 # works as expected
> ac <- c('A','B');
> identical(ac,ac[1:2])
[1] TRUE
 
 #but
> af <- factor(ac)
> identical(af,af[1:2])
[1] FALSE

Any opinions?

Jonathan Swinton, Statistical Scientist, Computational Biology, Pathway
Analysis, Global Sciences and Information, AstraZeneca




More information about the R-help mailing list