Writing a value at some memory address
Integer value. Address in memory.
New value to write at this address.
Nothing is returned.
Lafaye de Micheaux Pierre <firstname.lastname@example.org>, Remy Drouilhet <Remy.Drouilhet@upmf-grenoble.fr>, Liquet Benoit <email@example.com>
Chapter 9 (Managing Sessions) from the book: The R Software, Fundamentals of Programming and Statistical Analysis
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23
## Not run: x <- c(8L,9L) addr <- getaddr(x)$addr.int # Gets the address of the first # box of the 64-box block where x # is stored. addr writeaddr(addr,6L) # Write the integer 6 at this address. x writeaddr(addr+4L,7L) # An integer is coded over 4 bytes, # hence increment the address by 4 to # get to x. x x <- c(12.8,4.5) x addr <- getaddr(x)$addr.int # Get the address of the first box # of the 128-box block where x is # stored. writeaddr(addr,6.2) x writeaddr(addr+8L,7.1) # A double is coded over 8 bytes. x ## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.