[R] R-Fortran question (multiple subroutines)
Remko Duursma
remkoduursma at gmail.com
Mon Oct 25 06:33:30 CEST 2010
Dear R-helpers,
apologies if this is somewhere in a manual, I have not been able to
find anything relevant. I run Windows Vista.
I have some Fortran code in a subroutine, and have no problem calling
this from R with .Fortran, compiling the code either with 'R CMD
SHLIB' or independently with gfortran.
But is it possible to have more than one subroutine in my source file,
one depending on the other? Or is this not supported, or is there a
trick?
Of course, I could rewrite my code, but there are lots of subroutines...
I.e, my code looks something like this:
subroutine f(x,y,z)
call g(x,y,z)
end
subroutine g(x,y,z)
z = x*y
end
calling this from R shows that subroutine g is not called. The code
compiled as executable works fine.
thanks,
Remko
-------------------------------------------------
Remko Duursma
Research Lecturer
Centre for Plants and the Environment
University of Western Sydney
Hawkesbury Campus
Richmond NSW 2753
Mobile: +61 (0)422 096908
www.remkoduursma.com
More information about the R-help
mailing list