Displaying 1 result from an estimated 1 matches for "binary_fil".
Did you mean:
binary_file
2013 Apr 19
1
How to read a direct access file by connecting fortran with R ?
...out to call Fortran from R by doing the following steps:
I) I wrote a subroutine in fortran called read_binary.f90
************************************
Subroutine read_binary (n_col,row,img)
integer*1 :: im1(n_col)
integer*1 :: im2(n_col)
integer*1 :: im2(n_col)
open(10,file=binary_file,access=direct,action=read,status='old',recl=n_col*p)
if(p==1) then
read(10,rec=row) img1
img=img1
else if(p==2) then
read(10,rec=row) img2
img=img2
else
read(10,rec=row) img3
img=img3
endif
close(10)
End subroutine read_binary
*************...