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)
        call fseedo()
           enddo
          enddo
    end

In R:

dyn.load("func.so")
x <- matrix(0,5,6)
l <- nrow(x)
c <-
 ncol(x)
a <- 0

..Fortran("mat", x = x, l, c, as.double(a))

Results:

$x
     [,1] [,2] [,3] [,4] [,5] [,6]
[1,]    0    0    0    0    0    0
[2,]    0    0    0    0    0    0
[3,]    0    0    0    0    0    0
[4,]    0    0    0    0    0    0
[5,]    0    0    0    0    0    0

[[2]]
[1] 5

[[3]]
[1] 6

[[4]]
[1] 1


Thanks!!!


             Fábio Mathias Corrêa                       UFLA




      
____________________________________________________________________________________
[[elided Yahoo spam]]

        [[alternative HTML version deleted]]

______________________________________________
R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel

Reply via email to