Thanks Ivan for the tip. Are there any examples or links for me to follow 
through more closely?

Thanks,

Zhu

-----Original Message-----
From: Ivan Krylov <krylov.r...@gmail.com> 
Sent: Monday, May 6, 2019 4:14 AM
To: Wang, Zhu <wan...@uthscsa.edu>
Cc: R-package-devel@r-project.org
Subject: Re: [R-pkg-devel] How to obtain intercept of intercept-only glm in 
Fortran?

On Sat, 4 May 2019 22:41:16 +0000
"Wang, Zhu" <wan...@uthscsa.edu> wrote:

> In an R package I would like to compute intercept for an 
> intercept-only GLM in a Fortran subroutine.

If all else fails, you could use R API [*] to call coef(glm.fit(...)), though 
it might require writing a C or C++ wrapper to avoid translating all function 
prototypes from Rinternals.h into Fortran 2003 C interoperability syntax.

--
Best regards,
Ivan

[*]:
https://cran.r-project.org/doc/manuals/R-exts.html#Evaluating-R-expressions-from-C

______________________________________________
R-package-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-package-devel

Reply via email to