I don't understand at all what the problem is, but a workaround is simply not to specify the "pdf" argument in "name=value" form but rather in positional form. I.e. just make it the first argument to .Fortran(). As in:
tmp <- .Fortran("pdf", <other parameters here>) Works for me! :-) cheers, Rolf On 11/09/12 13:21, Peter Dunn wrote:
Hi all I've been getting some emails from the R package maintainers that I need to update some code in a CRAN packge that uses FORTRAN, to comply with (not so recent) changes. I've been a little busy... I'm having trouble adjusting my code. I hope someone can help. The package was working fine, and a few R functions in my package had lines like this: tmp <- .Fortran( name="pdf", <other parameters here>) and similar. The "pdf" is the name of the FORTRAN subroutine being called, of course. When I replace that line with tmp <- .Fortran( .NAME="pdf", <other parameters here>) ...the package then does not pass the checks. The library package builds OK with no errors or warnings, and then during "R CMD check" the examples give this error: out <- tweedie.profile( y~1, p.vec=seq(1.1, 1.9, length=9), do.plot=TRUE) 1.1 1.2 1.3 1.4 1.5 1.6 1.7 1.8 1.9 .Error in .Fortran(.NAME = "pdfun", as.double(power), as.double(phi[i]/(y[i]^(2 - : supplied argument name '.NAME' does not match 'name' Calls: tweedie.profile -> dtweedie.inversion -> .Fortran Execution halted I've had a search--including a read of the "Writing R Extensions" manual on CRAN (I did read it, but interestingly a search of that document did not reveal any instance of .NAME)--and I cannot see the problem. It's probably obvious. Any help appreciated, even pointers to more info.
<SNIP> ______________________________________________ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.