On Tue, 15 Sep 2009, Corrado wrote:
On Tuesday 15 September 2009 17:28:02 Gavin Simpson wrote:
[note you don't give us your x so I'm making this up - This is what
Duncan was going on about in an earlier thread, give us something we can
just paste into R and it works]
Dear Gavin,
I do not understand what more information! Take any vector of length 1, for
example x<-1. Plus all the command that where in my previous email ....
What is the logic behind
identical(length(x),1)
being false?
length(x) is an integer, and 1 is a floating point number. They aren't identical, just equal, so
identical(length(x), 1) is FALSE and length(x)==1 is TRUE.
identical(length(x), 1L) should be TRUE, since 1L is the way to specify an
integer value of 1.
-thomas
Thomas Lumley Assoc. Professor, Biostatistics
tlum...@u.washington.edu University of Washington, Seattle
______________________________________________
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.