identical(df[1,],df[2,]) is FALSE because of the row names. all( == ) is just a 
work-around that I attempted.

Jorgen.

On Mar 11, 2013, at 02:53 , PIKAL Petr wrote:

>> 
>>> df <- data.frame(x=c(1,1,NA,NA), y=c(2,2,7,7))
>>> identical(df[1,],df[2,])
>> [1] FALSE
>>> all(df[1,]==df[2,])
>> [1] TRUE
>>> all(df[3,]==df[4,])
>> [1] NA
> 
> I beg your pardon, whot does row names do with the above result? What do you 
> expect as a result of
> 
> all(df[3,]==df[4,])
> 
> Regards
> Petr
> 


        [[alternative HTML version deleted]]

______________________________________________
R-help@r-project.org mailing list
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