Re: [R] Package design, placement of legacy functions

2007-07-23 Thread Martin Maechler
 WA == William Asquith [EMAIL PROTECTED]
 on Sun, 22 Jul 2007 13:29:24 -0500 writes:

WA I have a function XOLD() from a nearly verbatim port of legacy  
WA FORTRAN in a package. I have remplemented this function as XNEW()  
WA using much cleaner native R and built-in functions of R. I have  
WA switched the package to the XNEW(), but for historical reasons would  
WA like to retain the XOLD() somewhere in the package directory  
WA structure. An assertion through a README or other will point to this  
WA historical function and the output from the two should be numerically  
WA equal.

WA Placement in package/R is not an option as XOLD() no longer  
WA constitutes a true user level function, would package/inst/legacyR or  
WA something like that be suitable to the R community?

Yes, put it somewhere inside pkg/inst/
(and end the filename in *.R).

A user of your **installed** package will be able
to use
system.file(legacy.R, package = pkg)
e.g.,
as  source(system.file(legacy.R, package = pkg))

WA Thanks for the guidance. . .

you're welcome.
Martin Maechler, ETH Zurich

__
R-help@stat.math.ethz.ch 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.


[R] Package design, placement of legacy functions

2007-07-22 Thread William Asquith
I have a function XOLD() from a nearly verbatim port of legacy  
FORTRAN in a package. I have remplemented this function as XNEW()  
using much cleaner native R and built-in functions of R. I have  
switched the package to the XNEW(), but for historical reasons would  
like to retain the XOLD() somewhere in the package directory  
structure. An assertion through a README or other will point to this  
historical function and the output from the two should be numerically  
equal.

Placement in package/R is not an option as XOLD() no longer  
constitutes a true user level function, would package/inst/legacyR or  
something like that be suitable to the R community?

Thanks for the guidance. . .

William

__
R-help@stat.math.ethz.ch 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.