[Rcpp-devel] Bug when using #' @title Hello world
JJ Allaire wrote:
Try locating the roxygen right above the function you want to document (rcpp_hello_world). If you do that then it will be placed next to that function in the .R file (when you have "standalone" roxygen within a C++ file then it's automatically associated with a NULL object in the .R file).>>
Thanks a lot, JJ, problem solved. For the record: It should be above the [[Rcpp:export]]. When you put it above the List rcppp..., which I had tried, it also fails.
#include <Rcpp.h>
using namespace Rcpp;
// [[Rcpp::export]]
//' @title Hello world
List rcpp_hello_world() {
CharacterVector x = CharacterVector::create( "foo", "bar" ) ;
NumericVector y = NumericVector::create( 0.0, 1.0 ) ;
List z = List::create( x, y ) ;
return z ;
}
Dieter