Re: [R] copying R objects in C

About this list Date view Thread view Subject view Author view Attachment view

From: Thomas Lumley (tlumley@u.washington.edu)
Date: Fri 07 May 2004 - 00:51:07 EST


Message-id: <Pine.A41.4.58.0405060749400.26970@homer09.u.washington.edu>

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@rmki.kfki.hu> MTA RMKI, ELTE TTK
> >
> > ______________________________________________
> > R-help@stat.math.ethz.ch mailing list
> > https://www.stat.math.ethz.ch/mailman/listinfo/r-help
> >
>
> --
> Tamás K. Papp
> E-mail: tpapp@axelero.hu
> Please try to send only (latin-2) plain text, not HTML or other garbage.
>
> ______________________________________________
> R-help@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@u.washington.edu University of Washington, Seattle

______________________________________________
R-help@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


About this list Date view Thread view Subject view Author view Attachment view

This archive was generated by hypermail 2.1.3 : Mon 31 May 2004 - 23:05:08 EST