[Rcpp-devel] Warning when using modules

Hmamouche Youssef hmamoucheyussef at gmail.com
Tue Oct 31 17:34:36 CET 2017


Well, i tried one module exposing one class. But the problem still the
same. I don't think this is about fixing code, because the problem is
resolved when i changed the way of loading the module:

*moduleName <- Module( "moduleName" )*
*.onLoad <- function(libname, pkgname) {}*

Instead of *loadModule ("moduleName", TRUE)*. So the loadModule () function
that causes this warning.

2017-10-30 23:56 GMT+01:00 Hmamouche Youssef <hmamoucheyussef at gmail.com>:

> Yes, i have more than one module, but each one is defined  with different
> name.
>
> 2017-10-30 22:52 GMT+01:00 Dirk Eddelbuettel <edd at debian.org>:
>
>>
>> On 30 October 2017 at 22:12, Hmamouche Youssef wrote:
>> | Hi,
>> |
>> | In a Rcpp package with the use of modules to convert c++ class,
>> | i get the following warning when I tested the module:
>> |
>> | Found more than one class "Rcpp-moduleName" in cache; using the first,
>> from
>> | namespace 'packageName'.
>> |
>> | To loadmodule, i use the following way in the module.R file:
>> |
>> |     - loadModule('moduleName', TRUE)
>> |
>> |     - Module ('moduleName', PACKAGE = "packageName").
>> |
>> | Is it possible to hide this warning ?
>>
>> You probably want to fix your code.  You likely have more than one Module
>> defined as Rcpp-moduleName.  As the lookup is by name, this is probably
>> not
>> what you want.
>>
>> Dirk
>>
>> --
>> http://dirk.eddelbuettel.com | @eddelbuettel | edd at debian.org
>>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.r-forge.r-project.org/pipermail/rcpp-devel/attachments/20171031/87269c5d/attachment.html>


More information about the Rcpp-devel mailing list