Re: [Rd] makeNamespace and rdyncall

From: Hadley Wickham <>
Date: Fri, 16 Dec 2011 08:11:10 -0500

This is also something I'd appreciate for the devtools package. Hadley

On Fri, Dec 16, 2011 at 7:36 AM, Daniel Adler <> wrote:
> Dear R Core Team,
> I have a question related to the programming interface for namespace object creation at run-time.
> This is something that I need in the rdyncall package:
> During the dynamic linkage binding of a shared C library, an R namespace object is created
> that gets populated with call wrappers, symbolic constants and type information objects.
> For example,
>> dynport(SDL) # create namespace, populated with wrappers to SDL library
>> search()     # gives a "package:SDL" populated with all kinds of wrappers to the C functions, etc..
> [1] ".GlobalEnv"        "package:SDL"
> I was trying various alternatives to get package-behaviour implemented in transparent manner for the end-user.
> The current version uses real namespace environments with all sorts of advantages such as support for
> search(), detach() and '::'.
> Namespace object have certain conventions for fields, and there is currently no
> public interface available in 'base' for setting up such objects;
> The function "makeNamespace" in src/library/base/namespace.R is defined as local function to "loadNamespace".
> So I go about this problem by 'copying' the code.
> Recently, R-2.14 introduced a new mandatory field 'lazyData' which mades rdyncall broken.
> (By re-synchronizing with 'makeNamespace' it has been fixed in 0.7.4.)
> Would it be possible and feasible to make namespace-related management functions such as makeNamespace and sealNamespace
> available as an public accessible interface? Or at least accessible via ':::' ?
> I would also appreciate any hint/idea for alternative ways to implement the above described behaviour.
> Here is the link to the code used for creation of dynamic C binding namespaces:
> best wishes,
> - Daniel
> ______________________________________________
> mailing list

Assistant Professor / Dobelman Family Junior Chair
Department of Statistics / Rice University

______________________________________________ mailing list
Received on Fri 16 Dec 2011 - 13:14:55 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 Fri 16 Dec 2011 - 14:15:19 GMT.

Mailing list information is available at Please read the posting guide before posting to the list.

list of date sections of archive