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

Dieter Menne dieter.menne at menne-biomed.de
Wed Feb 26 16:53:04 CET 2014


Hi,

I feel guilty that I am a Windows user, and that I am using RStudio, both of which is not welcome here. At least the latter is probably not guilty here. Before looking at the details, I had reported it on the RStudio list, because I thought it was a problem with roxygen.


To reproduce:

-- Generate the default rcpp_hello_world
-- Test; all works well in my installation, since I am using Rcpp a lot anyway.
-- Add the following title line to rcpp_hello_world.cpp

//' @title Hello world
#include <Rcpp.h>
using namespace Rcpp;

// [[Rcpp::export]]
List rcpp_hello_world() {

---
With compileAttributes, this generates:

# This file was generated by Rcpp::compileAttributes
# Generator token: 10BE3573-1514-4C36-9D1C-5A225CD40393

#' @title Hello world
NULL

rcpp_hello_world <- function() {
    .Call('test_rcpp_hello_world', PACKAGE = 'test')
}
-----

That's fine, but note the NULL, which kills the rest of my manual building chain.


R version 3.0.2 (2013-09-25)
Platform: x86_64-w64-mingw32/x64 (64-bit)

locale:
[1] LC_COLLATE=German_Germany.1252  LC_CTYPE=German_Germany.1252   
[3] LC_MONETARY=German_Germany.1252 LC_NUMERIC=C                   
[5] LC_TIME=German_Germany.1252    

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base     

other attached packages:
[1] Rcpp_0.11.0.2  roxygen2_4.0.0 test_1.0      

loaded via a namespace (and not attached):
[1] brew_1.0-6     digest_0.6.4   fortunes_1.5-2 stringr_0.6.2  tools_3.0.2   









More information about the Rcpp-devel mailing list