Displaying 2 results from an estimated 2 matches for "55aa743e0bc0".
Did you mean:
0x55aa743e0bc0
2020 Jan 09
6
Get memory address of an R data frame
Hello,
I would like for my C function to be able to manipulate some values stored in an R data frame.
To achieve this, a need the (real) memory address where the R data frame stores its data (hopefully in a contiguous way). Then, from R, I call the C function and passing this memory address as a parameter.
The question: how can we get the memory address of the R data frame?
Thank you!
L.
2020 Jan 09
0
Get memory address of an R data frame
Hi Lille,
Is it possible you're looking for tracemem() or inspect() ?
> x <- data.frame(z = 1:10)> tracemem(x)[1] "<0x55aa743e0bc0>"
> x[1] <- 2Ltracemem[0x55aa743e0bc0 -> 0x55aa778f6ad0]:
tracemem[0x55aa778f6ad0 -> 0x55aa778f6868]: [<-.data.frame [<-
tracemem[0x55aa778f6868 -> 0x55aa778f5b48]: [<-.data.frame [<-
> .Internal(inspect(x)) @55aa743e0bc0 19 VECSXP g0c1
[OBJ,MARK,NAM(7),TR,AT...