Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

If/else suggests package description

Tags:

package

r

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 <[email protected]>
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.

like image 471
Tyler Rinker Avatar asked Mar 11 '13 17:03

Tyler Rinker


People also ask

What is the difference between package a and Package B?

Package A recommends Package B, if the package maintainer judges that most users would not want A without also having the functionality provided by B. Package A suggests Package B if B contains files that are related to (and usually enhance) the functionality of A. See The Debian GNU/Linux FAQ for details.

What happens if <package name> is already installed in aptitude?

However, if <package name> is already installed, and not all Suggests dependencies are installed, 'nothing' happens... those remaining dependencies remain uninstalled. Is there a solution for this, beyond writing code? Show activity on this post. You can accomplish this using the advanced searching features of aptitude.

What is the difference between ifelse () and if else () in dplyr?

Let’s have a look that the documentation of dplyr says on this topic: Compared to the base ifelse (), this function is more strict. It checks that true and false are the same type. This strictness makes the output type more predictable, and makes it somewhat faster.

Are recommended packages installed by default?

People say that Recommended packages are installed by default, but they are clearly not included in the NEW packages that will be installed above.


1 Answers

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 =)

like image 108
tobif Avatar answered Nov 15 '22 09:11

tobif