Re: [Rd] prefix 'R_' when calling external code

From: Prof Brian Ripley <ripley_at_stats.ox.ac.uk>
Date: Wed 05 Jul 2006 - 08:19:50 GMT

On Sat, 1 Jul 2006, Benjamin Tyner wrote:

> I noticed that in
>
> https://svn.r-project.org/R/trunk/src/library/stats/R/loess.R
>
> that we are now calling R_loess_raw, R_lowesw, R_lowesp, etc. I'm
> interested to know what is the benefit/reason for the 'R_', as I am
> unfamiliar with this prefix and do not see it mentioned in 'Writing R
> Extensions.'

It is used when mapping external entry points to R symbols in that package: the latter must not clash with other R objects in the namespace, and this is why the prefix is added (in the NAMESPACE file, at

  # Refer to all C/Fortran routines by their name prefixed by R_ useDynLib(stats, .registration = TRUE, .fixes = "R_")

).

You say 'now': 'we' (R-core) never had loess_raw as an R symbol, rather "loess_raw" as a character string.

-- 
Brian D. Ripley,                  ripley@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@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel
Received on Wed Jul 05 18:24:55 2006

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.1.8, at Wed 05 Jul 2006 - 10:28:24 GMT.

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