From lille.stor at gmx.com  Wed Nov  1 19:37:19 2017
From: lille.stor at gmx.com (lille stor)
Date: Wed, 1 Nov 2017 19:37:19 +0100
Subject: [Rd] Memory address of character datatype
Message-ID: <trinity-3377bf0b-206d-450a-8735-ae632809ac54-1509561439669@3c-app-mailcom-bs12>

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.e. 1024)
?
The question now is what is the value of the jump?so that one can?obtain the memory address of where the value of variable "x" (of datatype "character"):
?

????? library(pryr)
? ??? x <- "abc"
?? ?? addr <- as.numeric(address(x)) +?????? # what should be the value of the jump so that?it points to the data of variable "x" (i.e. abc)?
?
Thank you in advance!



[Rd] Memory address of character datatype
lille stor