If/else suggests package description

Is there a way to do an ifelse statement in the suggests field of a package dependent upon OS type. For instance the installr package would be nice for a windows user and heavily related to a package but it's only available for Windows users. This means that a note will be raised in the CRAN check for a Mac or Linux user.

Currently I have a package that looks something like this:

Package: awesomeR
Type: Package
Title: A collection of awesomeness
Version: 0.1.2
Date: 2013-02-18
Author: Guy Smiley
Maintainer: Guy <guy@gmail.com>
Description: it's pretty nifty
License: GPL-2
URL: http://crazyville
LazyData: TRUE
Depends:
    R (>= 2.15)
Suggests:
    pander,
    installr,

Maybe the answer is either suggest it (and accept the notes) or don't.


I don't think you need special switch for Suggests according to OS for the cran check.

If it does not exist on/for a particular platform it will not get installed. I think such a package will not even be in the CRAN dependancies.

As far as I am concerned - Suggested packages hint to additional options and extend examples and functionality, but are not crucial for your package and a lot of users will not miss them ... but even if one is a Linux or MAc user, I think it is good to know that there is that suggested packages available ... and if they want they can use it on a different platform.

So my answer is - suggest it.

Also I think we should anyway strive towards cross-platform packages =)

链接地址: http://www.djcxy.com/p/12288.html

上一篇: 将编辑的数据保存为行

下一篇: 如果/ else建议包描述