From diy at stat.oregonstate.edu  Wed Nov  7 21:26:53 2012
From: diy at stat.oregonstate.edu (Yanming Di)
Date: Wed, 7 Nov 2012 12:26:53 -0800
Subject: [Rd] alternative to .Fortran("dqrls", ...)
In-Reply-To: <509ABDC3.9030801@stats.ox.ac.uk>
References: <509A240B.3050308@jrc.ec.europa.eu><7FF8666C-81E1-46FB-8B87-583726314989@r-project.org><D1BE25EA-2FE3-4744-A10F-3B831258AF89@r-project.org><73d0dce76a2f.509aadd2@jrc.ec.europa.eu>
	<509ABDC3.9030801@stats.ox.ac.uk>
Message-ID: <0D8B0CF6466B4BBB90D28169EF30BB69@science.oregonstate.edu>

Hi all,

In a package I maintain, I use the "dqrls" from the base package to fit 
regression models. However, I was informed that directly calling functions 
from the base package is no longer allowed:

"CRAN packages should use only the public API. Hence they should not use
entry points not declared as API in installed headers nor .Internal()
nor .Call() etc calls to base packages. Such usages can cause packages
to break at any time, even in patched versions of R."

Prof. Ripley suggested that one can replace such calls with lm.wfit, which 
will work.

However, in my package, the call will need to be implemented hundreds of 
thousands times. Using lm.wfit is much slower. I am wondering whether there 
is alternative ways that are more efficient. I can program in C if needed.

Many thanks.

Best regards,
Yanming



[Rd] alternative to .Fortran("dqrls", ...)
Yanming Di