Re: [R] Pass an optional argument from Fortran subroutine to a R wrapper

2016-09-07 Thread Erin Hodgess
Hello! You can't really pass the matrix as a matrix. Send it as a vector, re-construct it in the Fortran program. Actually, if it's a covariance matrix and symmetric, you may be able to get away with just sending part of the matrix. For example, if you have the following: covmat<- matrix(c(1,0.

[R] Pass an optional argument from Fortran subroutine to a R wrapper

2016-09-07 Thread Kodalore Vijayan, Vineetha W
Hello, I have a Fortran subroutine which uses an optional argument in the call. subroutine data (n,ns,alpha,covmat,x,y) integer, intent(in):: n,ns double precision, intent(in) :: alpha double precision, intent(in), optional ::covmat(n,ns) double precision, intent(out) :: x(n