Displaying 2 results from an estimated 2 matches for "a_alt".
Did you mean:
n_alt
2019 Jul 18
0
ALTREP wrappers and factors
...) return(x)
setAltClass(className = "test", classType = "real")
setAltMethod(className = "test", inspect = inspectFunc)
setAltMethod(className = "test", getLength = lengthFunc)
setAltMethod(className = "test", getDataptr = getPtrFunc)
A = runif(6)
A_alt = makeAltrep(className = "test", x = A, *attributes = list(dim = c(2,
3))*)
```
*RESULT*
```
> .Internal(inspect(A_alt))
@0x000000002385ac00 14 REALSXP g0c0 [NAM(1),ATT] Altrep object
ATTRIB:
@0x000000002385a8b8 02 LISTSXP g0c0 []
TAG: @0x00000000044b1a90 01 SYMSXP g1c0 [MARK,LCK...
2019 Jul 17
2
ALTREP wrappers and factors
Hello,
I?m experimenting with ALTREP and was wondering if there is a preferred way to create an ALTREP wrapper vector without using .Internal(wrap_meta(?)), which R CMD check doesn?t like since it uses an .Internal() function.
I was trying to create a factor that used an ALTREP integer, but attempting to set the class and levels attributes always ended up duplicating and materializing the