From henrik@bengt@@on @ending from gm@il@com  Fri Aug 24 19:55:54 2018
From: henrik@bengt@@on @ending from gm@il@com (Henrik Bengtsson)
Date: Fri, 24 Aug 2018 10:55:54 -0700
Subject: [Rd] True length - length(unclass(x)) - without having to call
 unclass()?
Message-ID: <CAFDcVCQdmLYM4gPj_zoz4KeoHGGUzJux9hLK_3vMVaeWUsrHQQ@mail.gmail.com>

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



[Rd] True length - length(unclass(x)) - without having to call unclass()?
Henrik Bengtsson