Skip to content
Prev 45217 / 63424 Next

Recommended way to call/import functions from a Suggested package

On Feb 26, 2013, at 6:48 PM, Herv? Pag?s wrote:

            
Hmm.. according to the docs that is not quite as intended: a package must work without "suggests" dependencies in the entirety. You can (conditionally) use suggested packages in datasets, examples or vignettes. Obviously, you could be tempted to hide this deficiency (functions failing without suggested packages) by not calling the functions that fail in your examples or tests, but I'd argue that is bypassing the design of "suggests".
I have no assumptions about what the author intended this functionality for, nor what you intend to use it for.
No - but as far as I can see it is in the spirit of the documentation which explicitly mentions if(require(..)) and further down talks about :: and Suggests - so putting 1 + 1 (conditionality and ::) has led me to devise what I suggested.

Cheers,
Simon

Thread (22 messages)

Davor Cubranic Recommended way to call/import functions from a Suggested package Feb 22 Hadley Wickham Recommended way to call/import functions from a Suggested package Feb 22 David Winsemius Recommended way to call/import functions from a Suggested package Feb 22 David Winsemius Recommended way to call/import functions from a Suggested package Feb 22 Mark Leeds Recommended way to call/import functions from a Suggested package Feb 22 Mark Leeds Recommended way to call/import functions from a Suggested package Feb 22 Simon Urbanek Recommended way to call/import functions from a Suggested package Feb 22 Hadley Wickham Recommended way to call/import functions from a Suggested package Feb 22 Berwin A Turlach Recommended way to call/import functions from a Suggested package Feb 22 Davor Cubranic Recommended way to call/import functions from a Suggested package Feb 25 Davor Cubranic Recommended way to call/import functions from a Suggested package Feb 25 Hadley Wickham Recommended way to call/import functions from a Suggested package Feb 25 Martin Morgan Recommended way to call/import functions from a Suggested package Feb 25 Hadley Wickham Recommended way to call/import functions from a Suggested package Feb 25 Davor Cubranic Recommended way to call/import functions from a Suggested package Feb 25 Milan Bouchet-Valat Recommended way to call/import functions from a Suggested package Feb 26 Hervé Pagès Recommended way to call/import functions from a Suggested package Feb 26 Simon Urbanek Recommended way to call/import functions from a Suggested package Feb 26 Hervé Pagès Recommended way to call/import functions from a Suggested package Feb 26 Simon Urbanek Recommended way to call/import functions from a Suggested package Feb 26 Hervé Pagès Recommended way to call/import functions from a Suggested package Feb 26 Simon Urbanek Recommended way to call/import functions from a Suggested package Feb 27