[R] Fortran (77) in R

Ko-Kang Kevin Wang kwan022 at stat.auckland.ac.nz
Tue Apr 9 10:05:11 CEST 2002


Hi,

I'm learning Fortran and trying to load a Fortran subroutine into R.

I've done:
   R SHLIB Fibonacci.f
and it compiled fine.

Then I went into R and done:
> dyn.load("Fibonacci.so")
> Fib <- function(n) {
+     .Fortran("Fibonacci",
+              as.integer(n))[[1]]
+ }
> Fib(5) 
Error in .Fortran("Fibonacci", as.integer(n)) : 
        C/Fortran function name not in load table

The dyn.load() worked fine, or so it seems.  I then tried writing a
function that calls my Fortran subroutine.  However the error message was
displayed, which I have no idea what it mean ;-(

Any help will be greatly appreciated!


Cheers,

Kevin

------------------------------------------------------------------------------
Ko-Kang Kevin Wang
Postgraduate PGDipSci Student
Department of Statistics
University of Auckland
New Zealand

Homepage: http://www.stat.auckland.ac.nz/~kwan022

E-mail: kwan022 at stat.auckland.ac.nz

-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
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