[Rd] Matrix with random number

Barry Rowlingson b.rowlingson at lancaster.ac.uk
Tue Jun 30 16:24:22 CEST 2009


>          x(i,j) = call myrbeta(1,4,5) ! It's correct?

> The code of the error in R is:
> dyn.load("func.so")
> Error in dyn.load("func.so") :
>   unable to load shared library '/home/julio/Orientados/Fabio/Fortran/mat-fortran/func.so':
>   /home/julio/Orientados/Fabio/Fortran/mat-fortran/func.so: undefined symbol: callmyrbeta_

 Fortran doesn't use 'CALL' when calling a function. Try:

      x(i,j) = myrbeta(1,4,5)

Fortran has SUBROUTINEs (which are CALLed and don't return a value)
and FUNCTIONs - which are just used like any other function.

Barry



More information about the R-devel mailing list