[Rcpp-devel] Rcpp-devel Digest, Vol 20, Issue 34

andre zege andre.zege at gmail.com
Mon Jun 20 02:08:18 CEST 2011


I reinstalled Rcpp, removed the package with R CMD REMOVE,  run
Rcpp.package.skeleton("cUtils", module=T), changed the package to one line
of C code, re-installed the package again with  R CMD INSTALL, and checked
it with R CMD  check cUtils

At this moment the following is in the package

cUtils.cpp
=============================
#include "cUtils.h"
double myplus(double x, double y){
  return x+y;
}

RCPP_MODULE(cUtils){
  using namespace Rcpp ;
  function("myplus",&myplus);
 }

cUtils.h
=================
#ifndef _cUtils_H
#define _cUtils_H
#include <Rcpp.h>
#endif

===========
I am still getting the error
Error in FUN("_rcpp_module_boot_cUtils"[[1L]], ...) :
  no such symbol _rcpp_module_boot_cUtils in package .GlobalEnv


The error happens in function getNativeSymbolInfo. I think it is because for
some reason
getNativeSymbolInfo(name, PACKAGE) gets PACKAGE=.GlobalEnv and i assume it
should be something else. I must be missing some simple point
that sets environment correctly, but as i don't have any working modules, i
don't know where to look for correctly functioning example. Any pointers
would
be greatly appreciated


On Sun, Jun 19, 2011 at 6:00 AM,
<rcpp-devel-request at r-forge.wu-wien.ac.at>wrote:

> Send Rcpp-devel mailing list submissions to
>        rcpp-devel at lists.r-forge.r-project.org
>
> To subscribe or unsubscribe via the World Wide Web, visit
>
> https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/rcpp-devel
>
> or, via email, send a message with subject or body 'help' to
>        rcpp-devel-request at lists.r-forge.r-project.org
>
> You can reach the person managing the list at
>        rcpp-devel-owner at lists.r-forge.r-project.org
>
> When replying, please edit your Subject line so it is more specific
> than "Re: Contents of Rcpp-devel digest..."
>
>
> Today's Topics:
>
>   1. Error in FUN("_rcpp_module_boot (andre zege)
>   2. Re: Error in FUN("_rcpp_module_boot (Davor Cubranic)
>   3. Short blog post on loop speed in R (Christian Gunning)
>
>
> ----------------------------------------------------------------------
>
> Message: 1
> Date: Sat, 18 Jun 2011 17:22:24 -0400
> From: andre zege <andre.zege at gmail.com>
> Subject: [Rcpp-devel] Error in FUN("_rcpp_module_boot
> To: rcpp-devel at lists.r-forge.r-project.org
> Message-ID: <BANLkTi=O_7dX0SoETet6dMfahuq2xfxgFQ at mail.gmail.com>
> Content-Type: text/plain; charset="iso-8859-1"
>
> I have an Rcpp package that i wrote a while back and got to work properly
> on
> my Ubuntu Linux (Maverick Meerkat) machine, R version 211.1. I used the
> package before, loaded modules, run functions, etc.
> However, when i try to do it now i am getting  errors that i wasn't able to
> find on rcpp-devel mail archive site or gmane. Basically, after i do the
> usual steps to load the module cUtils where my cpp functions are defined
>
> require(Rcpp)
> mod<-Module("cUtils")
>
> I am getting an error
>
> Error in FUN("_rcpp_module_boot_cUtils"[[1L]], ...) :
>  no such symbol _rcpp_module_boot_cUtils in package .GlobalEnv
>
> I thought maybe someone more familiar with inner mechanics of Rcpp could
> point to something i am missing.
>
> Thanks much
> Andre
> -------------- next part --------------
> An HTML attachment was scrubbed...
> URL: <
> http://lists.r-forge.r-project.org/pipermail/rcpp-devel/attachments/20110618/b7683c1a/attachment.html
> >
>
> ------------------------------
>
> Message: 2
> Date: Sat, 18 Jun 2011 20:53:18 -0700
> From: Davor Cubranic <cubranic at stat.ubc.ca>
> Subject: Re: [Rcpp-devel] Error in FUN("_rcpp_module_boot
> To: rcpp-devel at r-forge.wu-wien.ac.at
> Message-ID: <201106182053.18980.cubranic at stat.ubc.ca>
> Content-Type: Text/Plain;  charset="iso-8859-6"
>
> On June 18, 2011 02:22:24 PM andre zege wrote:
> > I have an Rcpp package that i wrote a while back and got to work properly
> > on my Ubuntu Linux (Maverick Meerkat) machine, R version 211.1. I used
> the
> > package before, loaded modules, run functions, etc.
> > However, when i try to do it now i am getting  errors that i wasn't able
> to
> > find on rcpp-devel mail archive site or gmane.
>
> Did you update R and/or your Ubuntu distribution and haven't rebuilt the
> package? They won't be binary compatible across versions of R.
>
> Davor
>
>
> ------------------------------
>
> Message: 3
> Date: Sat, 18 Jun 2011 20:54:21 -0700
> From: Christian Gunning <xian at unm.edu>
> Subject: [Rcpp-devel] Short blog post on loop speed in R
> To: rcpp-devel at r-forge.wu-wien.ac.at
> Message-ID: <BANLkTi=L8Ua3CfCSKPA9=pvVKBkt8sjTPw at mail.gmail.com>
> Content-Type: text/plain; charset=UTF-8
>
> Dear all,
>
> I haven't been able to keep up with the list this month (I'm looking
> forward to catching up on the Module developments), but I just posted
> this, which might be of interest to some.
>
>
> http://helmingstay.blogspot.com/2011/06/efficient-loops-in-r-complexity-versus.html
>
> If anyone has a few slides that might be good for introducing Rcpp to
> a scientist-centric, non-CS audience, I'd love to hear.
>
> best,
> Christian
>
>
> ------------------------------
>
> _______________________________________________
> Rcpp-devel mailing list
> Rcpp-devel at lists.r-forge.r-project.org
> https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/rcpp-devel
>
>
> End of Rcpp-devel Digest, Vol 20, Issue 34
> ******************************************
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.r-forge.r-project.org/pipermail/rcpp-devel/attachments/20110619/b4aad610/attachment-0001.htm>


More information about the Rcpp-devel mailing list