Re: [Rd] .C clarification

From: Prof Brian Ripley <ripley_at_stats.ox.ac.uk>
Date: Sat, 03 Mar 2012 17:29:21 +0000

On 03/03/2012 13:42, Terry Therneau wrote:
> Does .C duplicate unnecessary arguments? For instance
> fit<- .C("xxx", as.integer(n), x, y, z=double(15))
>
> The first and fourth arguments would have NAMED = 0. Is my guess that .C
> won't make yet one more (unnecessary) copy correct?

.C's internals (do_dotcode) does not know about NAMED. It duplicates (unless DUP=FALSE).

Use .Call if you want to control duplication.

> (Just trying to understand).
>
> Terry T
>
> ______________________________________________
> R-devel_at_r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-devel

-- 
Brian D. Ripley,                  ripley_at_stats.ox.ac.uk
Professor of Applied Statistics,  http://www.stats.ox.ac.uk/~ripley/
University of Oxford,             Tel:  +44 1865 272861 (self)
1 South Parks Road,                     +44 1865 272866 (PA)
Oxford OX1 3TG, UK                Fax:  +44 1865 272595

______________________________________________
R-devel_at_r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel
Received on Sat 03 Mar 2012 - 17:31:01 GMT

This quarter's messages: by month, or sorted: [ by date ] [ by thread ] [ by subject ] [ by author ]

All messages

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Sun 04 Mar 2012 - 15:40:24 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-devel. Please read the posting guide before posting to the list.

list of date sections of archive