The `Writing R Extensions', chapter 5 `System and foreign language interfaces' tells you how to compile and run Fortran code from R. -- Bjørn-Helge Mevik