"Liaw, Andy" <[EMAIL PROTECTED]> writes:

> Can some one tell me if it's possible to have conditional importFrom() in
> the package NAMESPACE file?  Basically I'd like to know if it's possible to
> make the NAMESPACE file compatible with R 1.9.0 and those 1.8.1 and earlier.
> The problem is that I want to import cmdscale(), which is in `mva' prior to
> 1.9.0 but in `stats' post 1.9.0.

Well, we've got good news and bad news.  The good news is that there
are facilities for conditionals in the NAMESPACE file.  The bad news
is that they were introduced in 1.9.0 so you can't use them for the
purpose you have in mind.

The way many of us have approached this is to freeze a version of the
package that works for R-1.8.1 and add  R(<= 1.8.1) to Depends: in the
DESCRIPTION file.

Then bump the version number, switch to importFrom(stats, ...) in the
NAMESPACE and add R(>= 1.9.0) to the Depends: line.

______________________________________________
[EMAIL PROTECTED] mailing list
https://www.stat.math.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html

Reply via email to