[R] 3 questions regarding matrix copy/shuffle/compares
Esmail
esmail.js at gmail.com
Sun Apr 26 17:45:08 CEST 2009
David Winsemius
> <dwinsemius at comcast.net> wrote:
>> My understanding of the OP's request was for some sort of copy which did
>> change when entries in the original were changed; the sort of behavior that
>> might be seen in a spreadsheet that had a copy "by reference".
You misunderstood (my phrasing wasn't probably the best), but I was
clear about wanting two independent copies.
From my earlier post:
(1) If I did
keep_pop[1:POP_SIZE] = pop[1:POP_SIZE]
to keep a copy of the original data structure before manipulating
'pop' potentially, would this make a deep copy or just shallow? Ie
if I change something in 'pop' would it be reflected in 'keep_pop'
too? (I don't think so, but just wanted to check). I would like
two independent copies.
Regardless, the net outcome was new knowledge, so this is a good outcome.
Esmail
More information about the R-help
mailing list