VectorAddr: Address of vector

Description Usage Arguments Value Author(s) References Examples

Description

Object representing an address of numeric vector

Usage

1

Arguments

x

Vector.

Value

An object of class VectorAddr.

Author(s)

Lafaye de Micheaux Pierre <lafaye@unsw.edu.au>, Remy Drouilhet <Remy.Drouilhet@upmf-grenoble.fr>, Liquet Benoit <b.liquet@uq.edu.au>

References

Chapter 9 (Managing Sessions) from the book: The R Software, Fundamentals of Programming and Statistical Analysis

Examples

 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 <- VectorAddr(x)		# Gets the address of the first
                            # box of the 64-box block where x
                            # is stored.
addr
update(addr,6L) # Write the integer 6 at this address.
x
update(addr+4L,7L) # An integer is coded over 4 bytes,
                      # hence increment the address by 4 to
                      # get to x[2].
x
x <- c(12.8,4.5)
x
addr <- VectorAddr(x)		# Get the address of the first box
                            # of the 128-box block where x is
                            # stored.
update(addr,6.2)
x
update(addr+8L,7.1) # A double is coded over 8 bytes.
x

## End(Not run)

TRSbook documentation built on May 2, 2019, 2:45 a.m.

Related to VectorAddr in TRSbook...