[Rd] Getting hold of a package's environment from C code
Seth Falcon
sfalcon at fhcrc.org
Mon Oct 23 06:05:18 CEST 2006
"Deepayan Sarkar" <deepayan.sarkar at gmail.com> writes:
> On 10/22/06, Duncan Murdoch <murdoch at stats.uwo.ca> wrote:
>> In R code, you could use getNamespace("pkg") to get the namespace
>> environment. I haven't tried this, but I'd assume
>>
>> PROTECT(rho = eval(lang2(install("getNamespace"),
>> ScalarString(mkChar("pkg"))));
>>
>> (or something like it) would be the C equivalent.
Perhaps:
R_FindNamespace(mkString(where))
+ seth
More information about the R-devel
mailing list