I'm not really disagreeing with this, but is not the point of pryr to let you
investigate internals from the R level?
Building code that relies on pryr returning things with specific properties is
very likely doubleplusunrecommended by pryr's author as well.
In that spirit, I suppose that you
If you were curious about the hidden details of the memory layout in R,
the best reference is the source code. In your example, you are not
getting to your string because there is one more pointer in the way, "x"
is a vector of strings, each string is represented by a pointer.
At C level, ther
Hi,
To get the memory address of where the value of variable "x" (of datatype
"numeric") is stored one does the following in R (in 32 bit):
library(pryr)
x <- 1024
addr <- as.numeric(address(x)) + 24 # 24 is needed to jump the
variable info and point to the data itself (i