Thanks, bgoodri, for all those useful suggestions.
I fixed the error and finally got to compile the model, but I got this error message.
Error in compileCode(f, code, language = language, verbose = verbose) :
Compilation ERROR, function(s)/method(s) not created! Warning message:
running command ‘make -f “C:/PROGRA~1/R/R-34~1.2/etc/x64/Makeconf” -f “C:/PROGRA~1/R/R-34~1.2/share/make/winshlib.mk” SHLIB_LDFLAGS=’(SHLIB_CXXLDFLAGS)' SHLIB_LD='(SHLIB_CXXLD)’ SHLIB=“file16e466222198.dll” WIN=64 TCLBIN=64 OBJECTS=“file16e466222198.o”’ had status 127
In addition: Warning messages:
1: running command ‘“C:/PROGRA~1/R/R-34~1.2/bin//R” CMD config CXX’ had status 1
2: running command ‘C:/PROGRA~1/R/R-34~1.2/bin/x64/R CMD SHLIB file16e466222198.cpp 2> file16e466222198.cpp.err.txt’ had status 1
do you have any idea what is wrong?
Thanks so much!
By the way, you said I can put the gamma(1, 1) out of the loop, but will it be the same?