You happened to send a link which points to the OP's own package :) I
think Jiefei would like to know how one can "officially" determine if an
arbitrary ALTERP object belongs to a class that he owns.
Argh, I am sorry! I did not notice that. My best bet for what I
thought the question was is section 1.1.2 of R Internals where they
note that: `unsigned int alt : 1; /* is this an ALTREP object? */`
This is also what the ALTREP macro checks. However, I also did not
notice the "... if an ALTREP object is from my package" part. I am
sorry.
Sincerely Yours,
Benjamin
Den man. 19. okt. 2020 kl. 11.25 skrev D?nes T?th <toth.denes at kogentum.hu
:
Benjamin,
You happened to send a link which points to the OP's own package :) I
think Jiefei would like to know how one can "officially" determine if an
arbitrary ALTERP object belongs to a class that he owns.
Regards,
Denes
On 10/19/20 10:22 AM, Benjamin Christoffersen wrote:
It seems as if you can you use the ALTREP macro as done in this
package:
The macro is defined here in Rinternals.h:
Den man. 19. okt. 2020 kl. 10.13 skrev Jiefei Wang <szwjf08 at gmail.com
Hi all,
I would like to determine if an ALTREP object is from my package, I
there is a function `ALTREP_CLASS` defined in RInternal.h but its
value is neither a `R_altrep_class_t` object nor an STRSXP
class name. I do not know how to correctly use it. Any suggestions?
Thanks,
Jiefei
[[alternative HTML version deleted]]