[Rcpp-devel] Are there any C++ function name restrictions?

Dale Smith dtsmith at mindspring.com
Thu May 30 02:51:43 CEST 2013


Since you changed the function name, you can no longer call rcpp_hello_world() from R. Try calling the new function name.

Better yet, start over, leave rcpp_hello_world code alone and add another .cpp, .h, and .R file with another function.

Dale

On May 29, 2013, at 8:41 PM, Asis Hallab <asis.hallab at gmail.com> wrote:

> Dear Dirk, Hadley and Rccp Experts,
> 
> thank you very much for your input.
> Unfortunately I still cannot solve my problem.
> 
> I took Dirk's advise and used Rcpp.package.skeleton(name="foobar") to
> create a new Hello-World package.
> Then I build and installed it with
> R CMD INSTALL foobar/
> 
> From an interactive R shell I could call the function
> rcpp_hello_world() successfully.
> 
> Then the very only thing I did was changing the function name
> rcpp_hello_world to
> conditionalProbabilityTables in three files src/rcpp_hello_world.h,
> src/rcpp_hello_world.cpp, and R/rcpp_hello_world.R
> 
> Finally I rebuild it with R CMD INSTALL foobar and could no longer
> call function rcpp_hello_world() in an interactive R shell.
> 
>> rcpp_hello_world()
> Error in .Call("conditionalProbabilityTables", PACKAGE = "foobar") :
> "conditionalProbabilityTables" not available for .Call() for package "foobar"
> 
> I put the whole test project "foobar" to be browsed and checked out on github:
> https://github.com/asishallab/foobar
> 
> Please help me resolve my issues.
> Thank you very much.
> _______________________________________________
> 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



More information about the Rcpp-devel mailing list