I am totally new to Fortran and well versed with R. I was handed down a huge Fortran program with about 30 subroutines and about 15 functions and many other lines of code. I was told that I needed to call the Fortran program from R. I have been searching online for ways to create this bridge between R and Fortran with very little success. I can successfully execute the Fortran exe file from the command line and create the desired outputs. The fortran file is called "FortFish.f"
A question:
From R, Do I call the Fortran program or do I have to call Fortran functions and subroutines separately?
From R, Do I call the entire Fortran program like this?: R CMD SHLIB FortFish.f and then use: dyn.load("FortFish.so")
If I cannot run the entire Fortran program at once, I will post a couple of small fortran functions and subroutines upon request. Does anyone have a running example of using R and Fortran that can share?
My Fortran code is extremely large, otherwise, I would post it here. Thank you.