OK, according to @paul.buerkner , the problem is the presence of C:\Rtools\mingw_32\bin
in your PATH. To delete this, click something like
- left-click on Start
- right-click on Computer
- left-click on Properties
- left-click on Advanced System Settings
- left-click on Environmental variables
- scroll down in the bottom window to Path and left-click it
- left-click Edit
- move the cursor all the way to the left then delete the part that says
C:\Rtools\mingw_32\bin;
(be sure to delete exactly one semi-colon) - left-click three Ok buttons
For me, it looks like
Then restart R, and try
fx <- inline::cxxfunction( signature(x = "integer", y = "numeric" ) , '
return ScalarReal( INTEGER(x)[0] * REAL(y)[0] ) ;
' )
fx( 2L, 5 ) # should be 10
without and then with first specifying Sys.setenv(USE_CXX14 = 1)
. Then rstan should work.