Skip to content
Prev 59048 / 63424 Next

Is there any way to check the class of an ALTREP?

It seems as if you can you use the ALTREP macro as done in this
package: https://github.com/Jiefei-Wang/SharedObject/blob/804b6ac58c63a4bae95343ab43e8b1547b07ee6b/src/C_interface.cpp#L185

and in base R: https://github.com/wch/r-source/blob/54fbdca9d3fc63437d9e697f442d32732fb4f443/src/include/Rinlinedfuns.h#L118

The macro is defined here in Rinternals.h:
https://github.com/wch/r-source/blob/abb550c99b3927e5fc03d12f1a8e7593fddc04d2/src/include/Rinternals.h#L325

Den man. 19. okt. 2020 kl. 10.13 skrev Jiefei Wang <szwjf08 at gmail.com>: