Thanks very much!
Fábio Mathias Corrêa UFLA
--- Em qua, 1/7/09, Kjell Konis escreveu:
De: Kjell Konis
Assunto: Re: [Rd] Matrix with random number
Para: "Fabio Mathias"
Cc: r-devel@r-project.org
Data: Quarta-feira, 1 de Julho de 2009, 8:30
Hi Fa
Hi Fabio,
Your function myrbeta returns void so assigning the output isn't going
to work. Instead you need to call it like a FORTRAN subroutine.
Also, I added arguments for the parameters of the beta and moved the
fseedi and fseedo calls outside of the loop.
This is a pretty basic FORTR
Thanks Mr. Barry Rowlingson
However, the matrix appears to zeros!
Notice the code below! Please!
Code in fortran
subroutine mat(x,l,c,a)
integer l,c
double precision x(l,c), a
integer i,j
do j = 1, c
do i = 1, l
call fseedi()
x(i,j) = myrbeta(a,1,2
> 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
Hello!
I have a program in Fortran and would like to build a matrix with random
numbers, I have a function in C.
However, I have problems with the use of function in R.
Code to compile: R CMD SHLIB mat.f myrbeta.c -o func.so
Code in C.
#include
#include
void F77_SUB(fseedi)(void){
Hello!
I have a program in Fortran and would like to build a matrix with random
numbers, I have a function in C.
However, I have problems with the use of function in R.
Code to compile: R CMD SHLIB mat.f myrbeta.c -o func.so
Code in C.
#include
#include
void F77_SUB(fseedi)(void){