Marian Talbert
2014-Jan-08 20:43 UTC
[Rd] CRAN rejects package because of write statement in Fortran
I recently developed an R package to make available a very large legacy program written in Fortran. My package has been rejected by CRAN due to this Write statement with the message "As 'Writing R Extensions' warns you against including Fortran I/O, this will not be allowed." The issue is that this Write statement does not involve I/O it is inernally writing an integer to a character which is then placed in an appropriate message (character string) passed to the error handling function recommened in writing R extensions rexit(message). I'm working with a very large legacy program which was developed over 16 years and I am reluctant to rewrite the entire error handling sections in R. I was wondering if anyone has gotten CRAN to accept a package with a Fortran write statement converting numbers to characters or if anyone has found another method for doing type conversion in Fortran without the "write" statement. Thanks for your help Marian -- View this message in context: http://r.789695.n4.nabble.com/CRAN-rejects-package-because-of-write-statement-in-Fortran-tp4683287.html Sent from the R devel mailing list archive at Nabble.com.
Marian Talbert
2014-Mar-17 20:30 UTC
[Rd] CRAN rejects package because of write statement in Fortran
So the best solution I've had just yet for this problem is to convert numeric to character in C and bypass the Fortran "Write" in that way. Unfortunately my C is a bit rusty and I'm having trouble getting this to work. I image in the C it should look something like: void F77_SUB(converti)(char *ch_Result, int i_Int){*ch_Result=sprintf("%d",*a); } and in the Fortran something like call converti(ch_Result,i_Int) but this is clearly not right any help would be greatly appreciated. -- View this message in context: http://r.789695.n4.nabble.com/CRAN-rejects-package-because-of-write-statement-in-Fortran-tp4683287p4686997.html Sent from the R devel mailing list archive at Nabble.com.