For the last case with the list:
x - 1:2; y = list(x)[rep(1, 4)]
.Internal(inspect(y))
@102bbe090 19 VECSXP g0c3 [MARK,NAM(2)] (len=4, tl=0)
@106119628 13 INTSXP g0c1 [MARK] (len=2, tl=0) 1,2
@106119628 13 INTSXP g0c1 [MARK] (len=2, tl=0) 1,2
@106119628 13 INTSXP g0c1 [MARK] (len=2, tl=0)
Thank you for a very thorough analysis. It seems whether or not an
operation makes a full copy really depends on the specific operation,
and that it is not safe to assume that because I know something is
unchanged there will be no copy. For example, in your last case only
one element of a list
Hi Ross --
On 01/23/2014 05:53 PM, Ross Boylan wrote:
[Apologies if a duplicate; we are having mail problems.]
I am trying to understand the circumstances under which R makes a copy
of an object, as opposed to simply referring to it. I'm talking about
what goes on under the hood, not the user
[Apologies if a duplicate; we are having mail problems.]
I am trying to understand the circumstances under which R makes a copy
of an object, as opposed to simply referring to it. I'm talking about
what goes on under the hood, not the user semantics. I'm doing things
that take a lot of memory,
4 matches
Mail list logo