Indeed, thanks.

Btw. is it by design, that if I do EVAL(lang3(install(), ...)) from a
package, it is not evaluated in the package's namespace?

Anyway, this is how I did it in some old code of mine:

  PROTECT(rho = EVAL(lang2(install("getNamespace"),
                           ScalarString(mkChar("igraph")))));

  PROTECT(ec=eval(lang3(install(".igraph.progress"), ScalarReal(percent),
                        ScalarString(mkChar(message))), rho));

I guess this still works.

Best,
Gabor


On Mon, Jan 27, 2014 at 10:39 PM, Gabriel Becker <gmbec...@ucdavis.edu>wrote:

> Gabor,
>
> You can evaluate R code from C, so it should be pretty straightforward to
> construct a call to :::
>
> ::: looks like it just uses get, so you could probably do that as well.
>
> ~G
>
>
> On Mon, Jan 27, 2014 at 7:30 PM, Gábor Csárdi <csardi.ga...@gmail.com>wrote:
>
>> Hi all,
>>
>> what is the supported way to get the package namespace from C? I want to
>> call a non-exported R function from C, and did not find anything in the
>> docs.
>>
>> Thanks,
>> Gabor
>>
>>         [[alternative HTML version deleted]]
>>
>> ______________________________________________
>> R-devel@r-project.org mailing list
>> https://stat.ethz.ch/mailman/listinfo/r-devel
>>
>
>
>
> --
> Gabriel Becker
> Graduate Student
> Statistics Department
> University of California, Davis
>

        [[alternative HTML version deleted]]

______________________________________________
R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel

Reply via email to