[R-pkg-devel] How to (conditionally) use an archived package (without Suggests)?

2018-02-24 Thread Marius Hofert
Hi, A package 'foo' uses a package 'bar' (in Imports). 'bar' has been archived and the maintainer of 'foo' was asked to fix the dependency on 'bar' according to WRE 1.1.3.1. Working with 'bar::' everywhere (and requireNamespace("bar", quietly = TRUE)), as well as moving 'bar' from Imports to Sugg

Re: [R-pkg-devel] How to (conditionally) use an archived package (without Suggests)?

2018-02-24 Thread Duncan Murdoch
On 24/02/2018 6:45 PM, Marius Hofert wrote: Hi, A package 'foo' uses a package 'bar' (in Imports). 'bar' has been archived and the maintainer of 'foo' was asked to fix the dependency on 'bar' according to WRE 1.1.3.1. Working with 'bar::' everywhere (and requireNamespace("bar", quietly = TRUE))

Re: [R-pkg-devel] How to (conditionally) use an archived package (without Suggests)?

2018-02-24 Thread Marius Hofert
> > if (requireNamespace("bar", quietly = TRUE)) { ># do the good stuff > } else { ># do some less good substitute > } > > without generating an error anywhere. Hi Duncan, thanks for helping. I use the above > > >> >> '::' or ':::' import not declared from: ‘bar’ >> 'loadNamespace' or '

Re: [R-pkg-devel] How to (conditionally) use an archived package (without Suggests)?

2018-02-24 Thread Dirk Eddelbuettel
On 25 February 2018 at 00:45, Marius Hofert wrote: | A package 'foo' uses a package 'bar' (in Imports). 'bar' has been | archived and the maintainer of 'foo' was asked to fix the dependency | on 'bar' according to WRE 1.1.3.1. | | Working with 'bar::' everywhere (and requireNamespace("bar", quiet

Re: [R-pkg-devel] How to (conditionally) use an archived package (without Suggests)?

2018-02-24 Thread Marius Hofert
On Sun, Feb 25, 2018 at 1:09 AM, Dirk Eddelbuettel wrote: > > On 25 February 2018 at 00:45, Marius Hofert wrote: > | A package 'foo' uses a package 'bar' (in Imports). 'bar' has been > | archived and the maintainer of 'foo' was asked to fix the dependency > | on 'bar' according to WRE 1.1.3.1. > |

Re: [R-pkg-devel] How to (conditionally) use an archived package (without Suggests)?

2018-02-24 Thread Duncan Murdoch
On 24/02/2018 7:26 PM, Marius Hofert wrote: On Sun, Feb 25, 2018 at 1:09 AM, Dirk Eddelbuettel wrote: On 25 February 2018 at 00:45, Marius Hofert wrote: | A package 'foo' uses a package 'bar' (in Imports). 'bar' has been | archived and the maintainer of 'foo' was asked to fix the dependency |

Re: [R-pkg-devel] How to (conditionally) use an archived package (without Suggests)?

2018-02-24 Thread Marius Hofert
On Sun, Feb 25, 2018 at 1:41 AM, Duncan Murdoch wrote: > On 24/02/2018 7:26 PM, Marius Hofert wrote: >> On Sun, Feb 25, 2018 at 1:09 AM, Dirk Eddelbuettel wrote: >>> >>> On 25 February 2018 at 00:45, Marius Hofert wrote: >>> | A package 'foo' uses a package 'bar' (in Imports). 'bar' has been >>>

Re: [R-pkg-devel] How to (conditionally) use an archived package (without Suggests)?

2018-02-24 Thread Dirk Eddelbuettel
On 24 February 2018 at 19:41, Duncan Murdoch wrote: | Don't throw an error, work around it. If you have no alternative code, | then don't test the "bar" code unless "bar" is installed. | | The basic idea is that your package should pass tests without errors | even if "bar" is not available. 1

Re: [R-pkg-devel] How to (conditionally) use an archived package (without Suggests)?

2018-02-24 Thread Duncan Murdoch
On 24/02/2018 7:56 PM, Marius Hofert wrote: On Sun, Feb 25, 2018 at 1:41 AM, Duncan Murdoch wrote: On 24/02/2018 7:26 PM, Marius Hofert wrote: On Sun, Feb 25, 2018 at 1:09 AM, Dirk Eddelbuettel wrote: On 25 February 2018 at 00:45, Marius Hofert wrote: | A package 'foo' uses a package 'bar'

Re: [R-pkg-devel] How to (conditionally) use an archived package (without Suggests)?

2018-02-24 Thread Hugh Parsonage
The relevant part of the repository policy: > Packages on which a CRAN package depends should be available from a > mainstream repository: if any mentioned in ‘Suggests’ or ‘Enhances’ fields > are not from such a repository, where to obtain them at a repository should > be specified in an ‘Addi