[R] identical(length(x), 1) returns FALSE, but print(length(x)) is 1, length(x)==1 is TRUE, and is.integer(lenght(x)) is TRUE????
Gavin Simpson
gavin.simpson at ucl.ac.uk
Tue Sep 15 18:34:47 CEST 2009
On Tue, 2009-09-15 at 17:28 +0100, Gavin Simpson wrote:
> On Tue, 2009-09-15 at 17:16 +0100, Corrado wrote:
> > Dear R,
<snip />
>
> Are you really looking for all.equal()?
>
> > isTRUE(all.equal(length(x), 1))
> [1] TRUE
Please ignore that bit of rubbish above, clearly that is not what is
required or wanted. Missed my afternoon coffee...
G
> HTH
>
> G
> >
> > Regards
--
%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%
Dr. Gavin Simpson [t] +44 (0)20 7679 0522
ECRC, UCL Geography, [f] +44 (0)20 7679 0565
Pearson Building, [e] gavin.simpsonATNOSPAMucl.ac.uk
Gower Street, London [w] http://www.ucl.ac.uk/~ucfagls/
UK. WC1E 6BT. [w] http://www.freshwaters.org.uk
%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%
More information about the R-help
mailing list