<div dir="ltr">I've tried to build the package without the Makefile.  I get an error referring to 'gfortran-4.2'.  I have 'gfortran-4.9' on my machine.  Any suggestions for where to look would be appreciated.  Thanks.<div>
<br></div><div><div>clang++ -I/Library/Frameworks/R.framework/Resources/include -DNDEBUG  -I/usr/local/include -I"/Library/Frameworks/R.framework/Versions/3.0/Resources/library/Rcpp/include" -I"/Library/Frameworks/R.framework/Versions/3.0/Resources/library/RcppArmadillo/include"  -UNDEBUG -Wall -pedantic -g -O0 -fPIC  -mtune=core2 -g -O2  -c RcppExports.cpp -o RcppExports.o</div>
<div>gfortran-4.2 -arch x86_64  -g -O0 -fPIC  -g -O2  -c mvt.f -o mvt.o</div><div>make: gfortran-4.2: No such file or directory</div><div>make: *** [mvt.o] Error 1</div><div>ERROR: compilation failed for package 'M2'</div>
<div>* removing '/private/var/folders/x6/r9tqs57504z47hfz0y3hzplw0000gn/T/Rtmpi82Z8h/M2'</div><div>Error: Command failed (1)</div></div><div><br></div></div><div class="gmail_extra"><br><br><div class="gmail_quote">
On Sun, Jan 26, 2014 at 11:15 AM, Dirk Eddelbuettel <span dir="ltr"><<a href="mailto:edd@debian.org" target="_blank">edd@debian.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
Scott,<br>
<div class="im"><br>
On 26 January 2014 at 10:58, Scott Monroe wrote:<br>
| I was hoping for advice on approaches to accomplishing the following goal.<br>
| I'd like to create an R package using Rcpp that calls the pmvnorm (cdf for<br>
| multivariate normal) function from the mvtnorm library.  I'd like to avoid<br>
| calling it through R, as I need to do it many times, and I'd like to avoid the<br>
| overhead in going between C++ and R.<br>
|<br>
| The source code, written by Alan Genz, is in Fortran.  I've also found on<br>
| GitHub a C++ wrapped version of the Fortran code:<br>
|<br>
| <a href="https://github.com/zhanxw/libMvtnorm" target="_blank">https://github.com/zhanxw/libMvtnorm</a><br>
|<br>
| The latter includes a Makefile, which I don't know how to handle.<br>
<br>
</div>Sorry to break this to you on a Sunday.  You will not make very far in<br>
programming if that remains an obstacle for you.  You really should buckle<br>
down and read a few tutorial or books on this.  It. Is. Not. That. Hard.<br>
<br>
Especially with R. And Rcpp. And existing packages -- at current count 164 on<br>
CRAN alone.  Look at their sources.  Many/most get by without a Makefile<br>
because R knows how to "Do The Right Thing". Including with Fortran.<br>
<br>
Now, the proper long-term solution is probably to talk to Torsten to have the<br>
relevant functions exported from his mvtnorm package so that other CRAN<br>
package can re-use the code.<br>
<br>
But it's a big world. Maybe someone will write this for you out of the<br>
kindness of their hearts, or maybe you can pay someoone.<br>
<span class="HOEnZb"><font color="#888888"><br>
Dirk<br>
<br>
--<br>
Dirk Eddelbuettel | <a href="mailto:edd@debian.org">edd@debian.org</a> | <a href="http://dirk.eddelbuettel.com" target="_blank">http://dirk.eddelbuettel.com</a><br>
</font></span></blockquote></div><br></div>