[R] Underscores and Fortran code

Duncan Murdoch murdoch at stats.uwo.ca
Fri Oct 12 16:06:08 CEST 2001

On Thu, 11 Oct 2001 16:48:12 -0400, you wrote in message
<15302.1420.571215.515265 at minke.stat.ufl.edu>:

>Any suggestions are welcome.  Am I missing anything?

A 5th suggestion:  you can change the R code.  In the Windows version
1.3.1, I get these results:

Just like you, an error with the real name:

 > .Fortran("dog_dog", as.double(x), as.double(y), as.double(z))
 Error in .Fortran("dog_dog", as.double(x), as.double(y),
as.double(z)) : 
         C/Fortran function name not in load table

But add an extra underscore to the call and things are fine:

 > .Fortran("dog_dog_", as.double(x), as.double(y), as.double(z))
 [1] 2

 [1] 3

 [1] 5

It seems like a fairly easy workaround to just append an extra
underscore to names when the compiler is doing this funny name

Duncan Murdoch
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-help-request at stat.math.ethz.ch

More information about the R-help mailing list