[R] output into an unformatted direct fortran file

Prof Brian Ripley ripley at stats.ox.ac.uk
Mon Jan 7 14:37:29 CET 2008


On Mon, 7 Jan 2008, Costas Douvis wrote:

> Hello everybody
>
> Is there a way to output data into a file like the unformatted, direct
> fortran files? That's the kind that can be opened with:
>
> open(30, file='file', format='unformatted', access='direct', rec=1000,
> convert='big endian')

Fortran file formats depend on the compiler and OS, neither of which you 
have told us.  You may be able to write a suitable file with writeBin: I 
would start by trying to read such a file with readBin.  Otherwise you 
link compiled Fortran into R to do this (if Fortran I/O works, again 
depends on your unstated system).

> Thank you in advance
> Kostas Douvis

-- 
Brian D. Ripley,                  ripley at stats.ox.ac.uk
Professor of Applied Statistics,  http://www.stats.ox.ac.uk/~ripley/
University of Oxford,             Tel:  +44 1865 272861 (self)
1 South Parks Road,                     +44 1865 272866 (PA)
Oxford OX1 3TG, UK                Fax:  +44 1865 272595




More information about the R-help mailing list