Hi,
For what it's worth, your code works fine on my mac:
R> ... your code ...
R> fun()
[1] 2 3 4 5 6 7 8 9 10 11
R> sessionInfo()
R version 2.13.0 Patched (2011-05-11 r55852)
Platform: x86_64-apple-darwin9.8.0/x86_64 (64-bit)
...
Also:
$ g++ --version
i686-apple-darwin10-g++-4.2.1 (GC
And the error he gets is:
Error in compileCode(f, code, language = language, verbose = verbose) :
Compilation ERROR, function(s)/method(s) not created! file786264e8.cpp: In
function ‘SEXPREC* file786264e8()’:
file786264e8.cpp:33: error: ISO C++ says that these are ambiguous, even
though the wors
Hi,
Here is a small example:
library("Rcpp")
library("inline")
fun <-cxxfunction(,
'
Environment e = Environment::global_env();
NumericVector bar = e["foo"];
bar = bar + 1;
return wrap(bar);
',plugin="Rcpp")
foo <- 1:10
fun()
This function works fine on my windows netbook, but does not work
Hello,
Let's try to narrow this down.
Please provide a small and reproducible example.
What is the version of the compiler. This is what I have on my iMac:
$ g++ --version
i686-apple-darwin10-g++-4.2.1 (GCC) 4.2.1 (Apple Inc. build 5666) (dot 3)
Copyright (C) 2007 Free Software Foundation, Inc.
Dear mailing list,
For a project I am working on speeding up a simulation in R by translating
it to C++ (using inline and Rcpp). It is done and works fine on my windows 7
64bit R, but for some reason it is not working on my supervisors latest mac
OSX (not sure of the version. should be up to date)