[R] copying R objects in C

Thomas Lumley tlumley at u.washington.edu
Thu May 6 16:51:07 CEST 2004


On Thu, 6 May 2004, Tamas Papp wrote:

> You can tell what a function does by looking at its help page, eg:
>
> ?duplicate
>
> There is no such function in R (1.9.0), so I don't see how you came
> across that function name.
>
> R performs a deep copy "on demand", and generally you should not worry
> about this, just use the assignment operator "<-".

He's programming in C, not in R.  duplicate is a C function that
copies an object.


>
> PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
> and the "Introduction to R", and the FAQ.


Please read the question, too.

	-thomas


> Best,
>
> Tamas
>
> On Thu, May 06, 2004 at 05:47:15AM +0200, Csardi Gabor wrote:
>
> > answer to myself:
> >
> > the 'duplicate' function does this, am I right?
> > It seems so....
> >
> > Gabor
> >
> > On Thu, May 06, 2004 at 02:18:19AM +0200, Csardi Gabor wrote:
> > > Dear R Users,
> > >
> > > do you know a way to copy an R object using C code? I know that
> > > there is a copyMatrix and also a copyVector function. There is
> > > also something called copyListMatrix, what is this good for? Is
> > > there anything for copying a list (of course deep copy is
> > > needed)?
> > >
> > > Thank you for your help,
> > > Gabor
> > [...]
> >
> > --
> > Csardi Gabor <csardi at rmki.kfki.hu>    MTA RMKI, ELTE TTK
> >
> > ______________________________________________
> > R-help at stat.math.ethz.ch mailing list
> > https://www.stat.math.ethz.ch/mailman/listinfo/r-help
> >
>
> --
> Tamás K. Papp
> E-mail: tpapp at axelero.hu
> Please try to send only (latin-2) plain text, not HTML or other garbage.
>
> ______________________________________________
> R-help at stat.math.ethz.ch mailing list
> https://www.stat.math.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
>

Thomas Lumley			Assoc. Professor, Biostatistics
tlumley at u.washington.edu	University of Washington, Seattle




More information about the R-help mailing list