<html><head><meta http-equiv="Content-Type" content="text/html charset=windows-1252"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;">Thanks!<div><br></div><div>I forgot about the github repository — hurray for no more R-Forge’s subversion browser…</div><div><br></div><div>Should bug reports and requests now be filed as Github issues?</div><div><br></div><div>Davor</div><div><br><div><div>On Jan 18, 2014, at 4:07 AM, JJ Allaire <<a href="mailto:jj.allaire@gmail.com">jj.allaire@gmail.com</a>> wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div style="font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;">Thanks for the report and sorry it took so long to get the the bottom<br>of it (I had also tried reproing to no avail). This is now fixed with<br><a href="https://github.com/RcppCore/Rcpp/commit/d366984e6aabc426bae7f827b9fabc69df8d707b">https://github.com/RcppCore/Rcpp/commit/d366984e6aabc426bae7f827b9fabc69df8d707b</a>.<br><br>J.J.<br><br>On Sat, Jan 18, 2014 at 6:41 AM, Romain Francois<br><<a href="mailto:romain@r-enthusiasts.com">romain@r-enthusiasts.com</a>> wrote:<br><blockquote type="cite"><br>Le 18 janv. 2014 à 06:10, Davor Cubranic <<a href="mailto:cubranic@stat.ubc.ca">cubranic@stat.ubc.ca</a>> a écrit :<br><br>Running compileAttributes with “verbose = TRUE” was very informative:<br><br>$ Rscript -e 'Rcpp::compileAttributes(".", TRUE)'<br>Exports from /Users/davor/projects/Davor/myPackage/src/rcpp_hello_world.cpp:<br>  List rcpp_hello_world(NumericVector foo)<br><br>Exports from<br>/Users/davor/projects/Davor/myPackage/src/rcpp_hello_world.cpp~:<br>  List rcpp_hello_world()<br><br><br>Answer: compileAttributes interprets Emacs backup files with extension<br>“.cpp~” as source files. (My fault for not zipping up the actual source<br>directory but the product of "R CMD build".)<br><br>Probable source of the error is in compileAttributes (Attributes.R:355):<br><br>   cppFiles <- list.files(srcDir, pattern = glob2rx("*.c*”))<br><br><br>Hi,<br><br>This has bitten me too in various training I gave about Rcp. I guess<br>[.]c(c|pp)$ would make a better pattern.<br>WRE says (if you read between the lines) that c++ files are .cpp or .cc<br><br>So this is a bug.<br><br>Romain<br><br>You need a better way to identify C++ sources. R-exts manual says R’s make<br>rules use .cc and .cpp for C++. (This is supposed to be recorded in<br>R_HOME/etcR_ARCH/Makeconf, so it could potentially be processed dynamically,<br>although I doubt that’s really necessary.)<br><br>Davor<br><br><br>On Jan 17, 2014, at 4:18 PM, Dirk Eddelbuettel <<a href="mailto:edd@debian.org">edd@debian.org</a>> wrote:<br><br><br>On 17 January 2014 at 15:32, Davor Cubranic wrote:<br>| On 2014-01-17, at 2:55 PM, Dirk Eddelbuettel wrote:<br>|<br>| > You had two mistakes here:<br>| ><br>| >  i)   after you alter an interface to be used by Rcpp Attributes, you<br>must<br>| >       re-run the compileAttributes() function to update the files.  See<br>the<br>| >       vignette for details.<br>|<br>| What do you mean by this? Like I said, I changed the .cpp file and re-run<br>|  compileAttributes. What I uploaded is the result afterwards.<br><br>The equivalent of<br><br>  $ cd myPackage; R -e 'Rcpp::compileAttributes(".")'<br><br>For once, I launched R and typed it by hand.<br><br>| >       (And if you use RStudio, this is done automagically)<br>|<br>| So it is by devtools, on one of the functions I regularly use in my<br>workflow, perhaps "test". If it wasn't, it would be such a pain.<br>|<br>| >  ii)  Your C++ function did not work as the 'List z = ...' parameter<br>| >       shadowed an already declared parameter from the function<br>interface.<br>| >       Renaming to zz or z2 works, of course.<br>|<br>| I fixed it and rerun compileAttributes. Still the same problem. New<br>version of the package is attached.<br><br>See here, based on your previous file.<br><br>edd@max:/tmp/davor/myPackage$ cat src/rcpp_hello_world.cpp<br><br>#include <Rcpp.h><br>using namespace Rcpp;<br><br>// [[Rcpp::export]]<br>List rcpp_hello_world(NumericVector z) {<br><br>  CharacterVector x = CharacterVector::create( "foo", "bar" )  ;<br>  NumericVector y   = NumericVector::create( 0.0, 1.0 ) ;<br>  List z2           = List::create( x, y ) ;<br><br>  return z2 ;<br>}<br>edd@max:/tmp/davor/myPackage$ R CMD check .<br>* using log directory ‘/tmp/davor/myPackage/..Rcheck’<br>* using R version 3.0.2 (2013-09-25)<br>* using platform: x86_64-pc-linux-gnu (64-bit)<br>* using session charset: UTF-8<br>* checking for file ‘./DESCRIPTION’ ... OK<br>* checking extension type ... Package<br>* this is package ‘myPackage’ version ‘1.0’<br>* checking package namespace information ... OK<br>* checking package dependencies ... OK<br>* checking if this is a source package ... OK<br>* checking if there is a namespace ... OK<br>* checking for executable files ... OK<br>* checking for hidden files and directories ... NOTE<br>Found the following hidden files and directories:<br>..Rcheck<br>These were most likely included in error. See section ‘Package structure’ in<br>the ‘Writing R Extensions’ manual.<br>* checking for portable file names ... OK<br>* checking for sufficient/correct file permissions ... OK<br>* checking whether package ‘myPackage’ can be installed ... WARNING<br>Found the following significant warnings:<br>Warning: /tmp/davor/myPackage/man/myPackage-package.Rd:31: All text must be<br>in a section<br>Warning: /tmp/davor/myPackage/man/myPackage-package.Rd:32: All text must be<br>in a section<br>See ‘/tmp/davor/myPackage/..Rcheck/00install.out’ for details.<br>* checking installed package size ... OK<br>* checking package directory ... OK<br>* checking DESCRIPTION meta-information ... WARNING<br>Non-standard license specification:<br>What Licence is it under ?<br>Standardizable: FALSE<br>* checking top-level files ... OK<br>* checking for left-over files ... OK<br>* checking index information ... OK<br>* checking package subdirectories ... WARNING<br>Found the following directory with the name of a check directory:<br>./..Rcheck<br>Most likely, these were included erroneously.<br>* checking R files for non-ASCII characters ... OK<br>* checking R files for syntax errors ... OK<br>* checking whether the package can be loaded ... OK<br>* checking whether the package can be loaded with stated dependencies ... OK<br>* checking whether the package can be unloaded cleanly ... OK<br>* checking whether the namespace can be loaded with stated dependencies ...<br>OK<br>* checking whether the namespace can be unloaded cleanly ... OK<br>* checking loading without being on the library search path ... OK<br>* checking dependencies in R code ... OK<br>* checking S3 generic/method consistency ... OK<br>* checking replacement functions ... OK<br>* checking foreign function calls ... OK<br>* checking R code for possible problems ... OK<br>* checking Rd files ... WARNING<br>prepare_Rd: myPackage-package.Rd:31: All text must be in a section<br>prepare_Rd: myPackage-package.Rd:32: All text must be in a section<br>prepare_Rd: myPackage-package.Rd:38-40: Dropping empty section \examples<br>* checking Rd metadata ... OK<br>* checking Rd cross-references ... WARNING<br>Unknown package ‘<pkg>’ in Rd xrefs<br>* checking for missing documentation entries ... OK<br>* checking for code/documentation mismatches ... WARNING<br>Codoc mismatches from documentation object 'rcpp_hello_world':<br>rcpp_hello_world<br>Code: function(z)<br>Docs: function()<br>Argument names in code not in docs:<br>  z<br><br>* checking Rd \usage sections ... OK<br>* checking Rd contents ... OK<br>* checking for unstated dependencies in examples ... OK<br>* checking line endings in C/C++/Fortran sources/headers ... OK<br>* checking line endings in Makefiles ... OK<br>* checking compilation flags in Makevars ... OK<br>* checking for portable use of $(BLAS_LIBS) and $(LAPACK_LIBS) ... OK<br>* checking compiled code ... OK<br>* checking examples ... OK<br>* checking PDF version of manual ... OK<br><br>WARNING: There were 6 warnings.<br>NOTE: There was 1 note.<br>See<br>‘/tmp/davor/myPackage/..Rcheck/00check.log’<br>for details.<br><br>edd@max:/tmp/davor/myPackage$<br><br><br>Hope this help,  Dirk<br><br>--<br>Dirk Eddelbuettel | <a href="mailto:edd@debian.org">edd@debian.org</a> | <a href="http://dirk.eddelbuettel.com">http://dirk.eddelbuettel.com</a><br><br><br>_______________________________________________<br>Rcpp-devel mailing list<br><a href="mailto:Rcpp-devel@lists.r-forge.r-project.org">Rcpp-devel@lists.r-forge.r-project.org</a><br><a href="https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/rcpp-devel">https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/rcpp-devel</a><br><br><br><br>_______________________________________________<br>Rcpp-devel mailing list<br><a href="mailto:Rcpp-devel@lists.r-forge.r-project.org">Rcpp-devel@lists.r-forge.r-project.org</a><br><a href="https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/rcpp-devel">https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/rcpp-devel</a></blockquote></div></blockquote></div><br></div></body></html>