[R] 'tracemem' question when I change the length of a vector

Peng Yu pengyu.ut at gmail.com
Tue Dec 15 21:44:48 CET 2009


Please see the following example. If I change the length of a vector
twice below, I don't understand why 'tracemem' is shown in the first
case but not the second case. Could somebody help explain it to me?

> x=1
> tracemem(x)
[1] "<0x1bad8c8>"
> length(x)=100# The 'tracemem' string is shown as expected.
tracemem[0x1bad8c8 -> 0x1c26518]:
> x=integer(0)
> tracemem(x)
[1] "<0x169e3a8>"
> length(x)=100# I don't understand why there is no 'tracemem' showing up here.




More information about the R-help mailing list