Hi,

On Mon, Apr 19, 2010 at 10:15 AM, Alex Bryant <abry...@i-review.com> wrote:
> Hi, for example:
>
>> x <- Orange
>> x2 <- x
>> x[1,]$age <- 50
>> x2[1,]
>  Tree age circumference
> 1    1 118            30
>
> I would like a way for x2 to also reference the modified x data frame without 
> having to reassign x2<x each time x is modified.

You can't *really* do this in R, but I believe you can rig up a work
around using environments (if you really have to).

This SO thread with links is *somehow* related to what you're asking.
Perhaps you'll find what you're looking for there:

http://stackoverflow.com/questions/2603184/r-pass-by-reference

-steve

-- 
Steve Lianoglou
Graduate Student: Computational Systems Biology
 | Memorial Sloan-Kettering Cancer Center
 | Weill Medical College of Cornell University
Contact Info: http://cbio.mskcc.org/~lianos/contact

______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to