[Rd] True length - length(unclass(x)) - without having to call unclass()?
Henrik Bengtsson
henrik@bengt@@on @ending from gm@il@com
Fri Aug 24 19:55:54 CEST 2018
Is there a low-level function that returns the length of an object 'x'
- the length that for instance .subset(x) and .subset2(x) see? An
obvious candidate would be to use:
.length <- function(x) length(unclass(x))
However, I'm concerned that calling unclass(x) may trigger an
expensive copy internally in some cases. Is that concern unfounded?
Thxs,
Henrik
More information about the R-devel
mailing list