On 26 February 2013 at 21:27, Greg Minshall wrote:
| hi.  if i Rcpp.package.skeleton(), i get this single R file,
| anRpackage/R/rcpp_hello_world.R:
| ----
| rcpp_hello_world <- function(){
|         .Call( "rcpp_hello_world", PACKAGE = "anRpackage" )
| }
| ----
| 
| on the other hand, if i Rcpp.package.skeleton(attributes=TRUE), i get
| two R files: RcppExports.R and rcpp_hello_world.R.  the former appears
| to be what is wanted
| ----
| # This file was generated by Rcpp::compileAttributes
| # Generator token: 10BE3573-1514-4C36-9D1C-5A225CD40393
| 
| rcpp_hello_world <- function() {
|     .Call('anRpackage_rcpp_hello_world', PACKAGE = 'anRpackage')
| }
| ----
| whereas the latter looks like.
| ----
| rcpp_hello_world <-
| function () 
| {
| }
| ----
| 
| i'm assuming the creation, in this case, of rcpp_hello_world.R is a

False. 

Packages are in fact allowed to contain for than one function. Cf many base R
packages. 

| mistake?  it seems to be evaluated when loading the resultant package,
| presumably *after* RcppExports.R, causing a gaping black hole.
| (deleting it before "R CMD build" seems to work.)

What "gaping hole"?

The package create from the skeleton builders is part of our unit tests.

Show reprocucible errors, or the mail doesn't exist ;-)

Dirk
 
| (this is Rcpp_0.10.2.)
| 
| cheers, Greg
| _______________________________________________
| Rcpp-devel mailing list
| [email protected]
| https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/rcpp-devel

-- 
Dirk Eddelbuettel | [email protected] | http://dirk.eddelbuettel.com  
_______________________________________________
Rcpp-devel mailing list
[email protected]
https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/rcpp-devel

Reply via email to