Skip to content
Prev 27036 / 63434 Next

Wrong length of POSIXt vectors (PR#10507)

Duncan Murdoch <murdoch at stats.uwo.ca> writes:
Physical length and logical length are, as you say, two different things.  So
why not two functions?  Keep length() for physical length, as it is now, and
maybe Length() for logical length.  The latter could be defined as

Length <- function(x, ...) UseMethod("Length")

Length.default <- function(x, ...) length(x)

and then add methods for classes that want something else.