Displaying 1 result from an estimated 1 matches for "gerifalte28_at_hotmail".
2009 Jun 16
1
Testing if all elements are equal in a vector/matrix
...first few itself. For example:
> x = c(1,2,rep(1,100000))
I want the answer as FALSE, which is clear from the first two
observations itself and we don't need to check for the rest.
Does anybody know the most efficient way of doing this?
Regards
Utkarsh
From: Francisco J. Zagmutt <gerifalte28_at_hotmail.com
<mailto:gerifalte28_at_hotmail.com?Subject=Re:%20%5BR%5D%20Testing%20if%20all%20elements%20are%20equal%20in%20a%20vector/matrix>>
Date: Tue 30 Aug 2005 - 06:05:20 EST
Hi Doran
The documentation for isTRUE reads 'isTRUE(x)' is an abbreviation of
'identical(TRUE,x)'...