<div>Hi all,</div><div><br></div><div>Is the appropriate place to report bugs, or should I send this somewhere else?</div><div><br></div><div>I'm using: </div><blockquote style="margin:0 0 0 40px;border:none;padding:0px">
<div><div>Package: RcppArmadillo</div></div><div><div>Version: 0.3.2.3</div></div><div><div>Date: $Date: 2012-06-29 20:51:46 -0500 (Fri, 29 Jun 2012) $</div></div></blockquote><div><br></div><div>Minimal example: </div><div>
<br></div><div><div> #############################</div><div> # File : build-R-pacakge.R #</div><div> #############################</div><div> require(inline)</div><div> require(Rcpp)</div><div> require(RcppArmadillo)</div>
<div><br></div><div> # Define a simple cxxfunction</div><div> plus.two.cpp.src <- '</div><div> arma::mat U = Rcpp::as<arma::mat>(UmatrixR);</div><div> return(Rcpp::wrap(U+2));</div><div> '</div>
<div> plus.two.cpp <- cxxfunction(</div><div> signature(UmatrixR="numeric"),</div><div> body=plus.two.cpp.src,</div><div> plugin="RcppArmadillo")</div>
<div><br></div><div> # Define the analogous R funtion</div><div> plus.two.r <- function( x ) {</div><div> return( x + 2 )</div><div> }</div><div><br></div><div><br></div><div>## Step 2: Run RcppArmadillo.package.skeleton</div>
<div>In new R session run: </div><div><br></div><div> source('build-R-package.R')</div><div> RcppArmadillo.package.skeleton(name='inlineExample',</div><div> list=c('plus.two.cpp', 'plus.two.r'),</div>
<div> code_files='build-R-package.R')</div><div><br></div><div>## Step 3: Run R CMD build ## </div><div>Run </div><div><br></div><div> $ R CMD build inlineExample/</div><div><br></div><div>
which successfully builds `inlineExample_1.0.tar.gz`. </div>
<div><br></div><div>## Step 4: Run R CMD check ##</div><div><br></div><div>It fails. </div><div><br></div><div> $ R CMD check inlineExample_1.0.tar.gz </div><div> << snip >></div><div> * checking whether package ‘inlineExample’ can be installed ... ERROR</div>
<div> Installation failed.</div><div> See ‘/home/nathanvan/example/inlineExample.Rcheck/00install.out’ for details.</div><div><br></div><div>and the "detail" output:</div><div><br></div></div><blockquote style="margin:0 0 0 40px;border:none;padding:0px">
<div><div>$ cat inlineExample.Rcheck/00install.out</div></div><div><div>* installing *source* package ‘inlineExample’ ...</div></div><div><< snip >> </div><div><div>** R</div></div><div><div>** preparing package for lazy loading</div>
</div><div><div>** help</div></div><div><div>Warning: /home/nathanvan/example/inlineExample.Rcheck/00_pkg_src/inlineExample/man/inlineExample-package.Rd:33: All text must be in a section</div></div><div><div>Warning: /home/nathanvan/example/inlineExample.Rcheck/00_pkg_src/inlineExample/man/inlineExample-package.Rd:34: All text must be in a section</div>
</div><div><div>*** installing help indices</div></div><div><div>Error in Rd_info(db[[i]]) : </div></div><div><div> missing/empty \title field in '/home/nathanvan/example/inlineExample.Rcheck/00_pkg_src/inlineExample/man/plus.two.cpp.Rd'</div>
</div><div><div>Rd files must have a non-empty \title.</div></div><div><div>See chapter 'Writing R documentation' in manual 'Writing R Extensions'.</div></div><div><div>* removing ‘/home/nathanvan/example/inlineExample.Rcheck/inlineExample’</div>
</div></blockquote><div><br></div><div>A work around is to simply delete the man/*.Rd files. Then it works. </div><div><br></div><div>For example: </div><div><br></div><div><blockquote style="margin:0 0 0 40px;border:none;padding:0px">
<div><div>$ rm inlineExample/man/*.Rd</div></div><div><div>$ R CMD build inlineExample</div></div><div><div>$ R CMD check inlineExample</div></div><div><br></div></blockquote>works fine, although it complains about missing the documentation. (If I knew how to read *.Rd files, I might be able to point out precisely what is wrong, but they are a bit of mystery to me.)<br>
<blockquote style="margin:0 0 0 40px;border:none;padding:0px"><div><br></div></blockquote></div><div>Cheers,</div>-- <br>Nathan VanHoudnos<br>|- Statistics & Public Policy PhD student<br>|- Program for Interdisciplinary Education Research (PIER) Fellowship<br>
|- Carnegie Mellon University<br>|- <a href="http://www.andrew.cmu.edu/user/nmv" target="_blank">http://www.andrew.cmu.edu/user/nmv</a><br><br>"We may at once admit that any inference from the particular to the<div>
general must be attended with some degree of uncertainty, but this</div>
<div> is not the same as to admit that such inference cannot be absolutely</div><div> rigorous, for the nature and degree of the uncertainty may itself be </div><div> capable of rigorous expression." -- R.A. Fisher</div>
<br>