Skip to content
Prev 7255 / 10988 Next

[Rcpp-devel] Bug when using #' @title Hello world

JJ Allaire wrote:

            
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