I think I've fixed it. Code is committed on that same 'jperraud' branch.
Thanks for reporting this; it led to fixing something rather important. Basically the root cause was that R_HOME ends up set with long directory paths with dreaded blanks instead of short old style DOS 8.3 paths. Not sure whether this is an R bug and/or R.NET; anyway now R.NET makes sure short path names for R_HOME are used in all cases.
More detailed information for the record at issue 97
I can now run to completion:
using the example for the manual page of
Thanks for reporting this; it led to fixing something rather important. Basically the root cause was that R_HOME ends up set with long directory paths with dreaded blanks instead of short old style DOS 8.3 paths. Not sure whether this is an R bug and/or R.NET; anyway now R.NET makes sure short path names for R_HOME are used in all cases.
More detailed information for the record at issue 97
I can now run to completion:
REngine.SetEnvironmentVariables(); using (REngine e = REngine.GetInstance()) e.Evaluate("library(Rcpp)"); e.Evaluate("setwd('c:/tmp')"); e.Evaluate("sourceCpp('fibonacci.cpp')"); var x = e.Evaluate("fibonacci(7)").AsNumeric();
Rcpp::sourceCpp
#include <Rcpp.h> // [[Rcpp::export]]int fibonacci(constint x) { if (x == 0) return(0); if (x == 1) return(1); return (fibonacci(x - 1)) + fibonacci(x - 2); }
sessionInfo
:R version 3.0.3 (2014-03-06)
Platform: i386-w64-mingw32/i386 (32-bit)
locale:
[1] LC_COLLATE=English_Australia.1252 LC_CTYPE=English_Australia.1252 LC_MONETARY=English_Australia.1252 LC_NUMERIC=C
[5] LC_TIME=English_Australia.1252
attached base packages:
[1] stats graphics grDevices utils datasets methods base
other attached packages:
[1] Rcpp_0.10.6
loaded via a namespace (and not attached):
[1] tools_3.0.3