Reading FORTRAN-written double precision variables

2019-09-09 20:21发布

问题:

I have a file containing double precisions written from a FORTRAN code in the format of x.yyyyD+zz. When using read.csv in R, R does not seem to recognize those as floating point values. I'm new to R; what's the trick here?

回答1:

Use sed or your favourite text editor to change the Ds to Es, I expect R will happily read the numbers after you do that.



标签: r fortran double