[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????
Corrado
ct529 at york.ac.uk
Tue Sep 15 18:16:24 CEST 2009
Dear R,
the condition:
identical(length(x),1) returns FALSE
but
print(length(x))
returns 1 and:
is.vector(x) is TRUE.
is.integer(length(x)) is TRUE
length(x) ==1 is TRUE
I am puzzled.
Regards
--
Corrado Topi
Global Climate Change & Biodiversity Indicators
Area 18,Department of Biology
University of York, York, YO10 5YW, UK
Phone: + 44 (0) 1904 328645, E-mail: ct529 at york.ac.uk
More information about the R-help
mailing list