search for: testrwrapper

Displaying 1 result from an estimated 1 matches for "testrwrapper".

Did you mean: test_wrapper
2008 Feb 14
0
passing R array to Fortran subroutine
...ot find an example that performs the task. I have looked at "Writing R Extensions", and understand in concept what needs to happen, but all the examples are written in C. Below are my fortran subroutine, the R function that calls it, and the R output. ====== foo.F90 ====== SUBROUTINE testRwrapper(n) DOUBLE PRECISION :: n(:) INTEGER :: i ! answer = factorial(n) do i=1,3 n(i) = n(i) + i/1.0 end do END SUBROUTINE testRwrapper ====== test.R ====== foo <- function(n) { # If the library hasn't been loaded yet, load it if (!is.loaded('testRwrapper')) { dyn....