[R] Help running a Fortran subroutine from R

dc896148 cyr.derek at gmail.com
Wed Mar 17 01:03:20 CET 2010


The output will be an array of the same dimension as 'array', the first
argument passed to the subroutine.  The output array is the second argument,
'array1', which will be populated with the smoothed values according to the
subroutine.  
I can run the subroutine in R without receiving an error, it's just that the
returned values in 'array1' appear incorrect.  I know they are wrong,
because if the subroutine is just averaging nearby elements together, the
results should be of somewhat similar magnitude.  However, in the output, I
receive values such as 1.5e+200, which is astronomically huge!  
Missing values are REALS and denoted 999.00 in the text file.  The output
can and will contain missing values  because if there are no values to
average within a nx x ny window, the result returned is missing.

Hope this makes sense.  I also hope someone can get some reasonable output. 
I compiled the filter2d.f file with g77, so I don't know if this would be a
problem to.  I am trying R CMD SHLIB to re-create the DLL file, but I
haven't had any luck yet.  If anyone else is able to, please let me know.

Thanks in advance.
  
-- 
View this message in context: http://n4.nabble.com/Help-running-a-Fortran-subroutine-from-R-tp1595641p1595756.html
Sent from the R help mailing list archive at Nabble.com.



More information about the R-help mailing list