[Rd] number of copies

Terry Therneau therneau at mayo.edu
Mon Oct 3 16:32:37 CEST 2011

 I'm looking at memory efficiency for some of the survival code.  The
following fragment appears in coxph.fit
    coxfit <- .C("coxfit2", iter=as.integer(maxiter),
                   as.integer(nvar), stime,
                   x= x[sorted,] ,

Does this make a second copy of x to pass to the routine (my
expectation) or will I end up with 3: x and x[sorted,] in the local
frame of reference, and another due to dup=TRUE?

Terry T.

More information about the R-devel mailing list