Re: [R-pkg-devel] Errors from Suggests or Enhances not in mainstream repositories

2018-07-03 Thread Hadley Wickham
On Tue, Jul 3, 2018 at 5:57 AM, Duncan Murdoch  wrote:
> On 02/07/2018 6:13 PM, Ben Bolker wrote:
>>
>> I got something similar.  I have a few thoughts:
>>
>> (1) you should use  "if (require(citrus)) { ... }" in your examples;
>> "Suggests" and "Enhances" packages are supposed to be *optional*, i.e.
>> examples and tests should be able to run even if they're not installed
>
>
> Nowadays 'if (requireNamespace("citrus")) { ... }' would be preferred in
> tests and examples, along with a 'citrus::' prefix on the objects from that
> package that are needed.  This has milder side effects than `require()`.

And requireNamespace("citrus", quietly = TRUE) is even slightly better
since it avoids one more side-effect ;)

Hadley

-- 
http://hadley.nz

__
R-package-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-package-devel


Re: [R-pkg-devel] Errors from Suggests or Enhances not in mainstream repositories

2018-07-03 Thread Duncan Murdoch

On 02/07/2018 6:13 PM, Ben Bolker wrote:

I got something similar.  I have a few thoughts:

(1) you should use  "if (require(citrus)) { ... }" in your examples;
"Suggests" and "Enhances" packages are supposed to be *optional*, i.e.
examples and tests should be able to run even if they're not installed


Nowadays 'if (requireNamespace("citrus")) { ... }' would be preferred in 
tests and examples, along with a 'citrus::' prefix on the objects from 
that package that are needed.  This has milder side effects than 
`require()`.


Duncan Murdoch

__
R-package-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-package-devel


Re: [R-pkg-devel] Errors from Suggests or Enhances not in mainstream repositories

2018-07-03 Thread Duncan Murdoch

On 02/07/2018 4:18 PM, Throm, Allison wrote:

Hi all,


I'm trying to submit a package to the CRAN that further examines results from the 
"citrus" package as done for an accepted publication (available on Github: 
).


I do not get any errors when using devtools::check() on my Mac, which already has the 
citrus package installed. However, I am getting errors during the CRAN submission 
check 
.


I've tried searching Stack Overload and other CRAN packages with 
Additional_repositories fields, but none of the applicable solutions have worked. I'm 
pretty sure it's the loading of the citrus package that is causing the error and have 
added the Additional_repositories field with a link the package on Github, but still 
haven't been able to resolve the issue. There are very specific installation 
instructions for the package 
, which may be 
contributing to issues.


How should I properly specify dependencies on the 
nolanlab/citrus Github package for my CRAN 
package?


I don't think you posted your DESCRIPTION file, but the likely problem 
based on the check log is that your "Additional_repositories" field 
points to something that CRAN doesn't recognize as an R package repository.


Probably the easiest way to create the right structure is to use the 
drat package; see  https://github.com/eddelbuettel/drat  for instructions.


Duncan Murdoch

__
R-package-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-package-devel


Re: [R-pkg-devel] Errors from Suggests or Enhances not in mainstream repositories

2018-07-02 Thread Uwe Ligges




On 03.07.2018 00:41, Ben Bolker wrote:

Thanks, Uwe.  Responses inline.

On Mon, Jul 2, 2018 at 6:23 PM Uwe Ligges
 wrote:




On 03.07.2018 00:13, Ben Bolker wrote:

I got something similar.  I have a few thoughts:

(1) you should use  "if (require(citrus)) { ... }" in your examples;
"Suggests" and "Enhances" packages are supposed to be *optional*, i.e.
examples and tests should be able to run even if they're not installed
(I would imagine that "Writing R Extensions" and/or the CRAN policies
say something to this effect, but I haven't checked)
(2) I can imagine that win-builder is looking for *binary* versions of
the package (I'm not sure why this would be the default, and why it
couldn't fall back and install from source, but that would be my
guess); do you have binary versions, for the appropriate major R
version (i.e. 3.5 for release, maybe?? 3.4 for oldrelease??), in your
repo. (In my example, I don't; I was going to try compiling a binary
version and putting it in the repo. This is a bit of a chicken-and-egg
problem if you can't get a binary built because the examples fail, but
if you implement step #1 I think it should work).

My point (3) is a follow-on question that I would love an answer to,
or hints. I get a *message* similar to the one found in throm's
win-builder logs, i.e. "Suggests or Enhances not in mainstream
repositories: ..." - but since it's not labeled as a WARNING or an
ERROR (or even a NOTE), I am wondering what its status is in the
CRAN-maintainers' eyes - is it a CRAN-submission-blocking problem? Or
a "we'd rather you didn't do that but we'll accept it this time?" or
...



Uwe> Ideally packages are in mainstream repositories.

   Agreed.

Uwe> For waek dependencies such as Suggests or Enhances, and if the package
Uwe> is in some repository, you can declare it via the
Uwe> Additional_Repositories field.

   I did that (so did the OP). Speaking for myself (since I'm not sure
of the OP's exact situation), I know that the source tarball is in my
repo, and it gets installed successfully on Linux and MacOS. On
Windows (win-builder), the package is not detected in the repo. I can
try adding a Windows binary to the repo to see if that solves the
problem.


Ah, no, it won't be installed. We only isntall from mainstream repositories.




   FWIW, one of the off-CRAN packages I Suggest: is INLA (which is
beyond my control). The other is glmmADMB, which includes a binary
blob and can't go on CRAN.  I would like to offer some support for
these packages, if at all possible.

I just don't know if the message about the package *not* being found
in the repo suggested by Additional_repositories: will be
CRAN-blocking (and would prefer not to waste everyone's time by
submitting if it is ...)


If it is correctly declared, it is not blocking.

Best,
Uwe


Uwe> Finally, if not even in a repository, explain in the Descripton field
Uwe> how to get it.


Best,
Uwe Ligges



 I'm not asking anyone (except possibly CRAN maintainers) to speak
for the CRAN maintainers, but if anyone has any experience or guesses
(or pointers to parts of the CRAN policies/Writing R Extensions
document that I overlooked) I'd appreciate hearing about it.

cheers
   Ben Bolker
On Mon, Jul 2, 2018 at 5:28 PM Throm, Allison  wrote:


Hi all,


I'm trying to submit a package to the CRAN that further examines results from the 
"citrus" package as done for an accepted publication (available on Github: 
).


I do not get any errors when using devtools::check() on my Mac, which already has the 
citrus package installed. However, I am getting errors during the CRAN submission 
check 
.


I've tried searching Stack Overload and other CRAN packages with 
Additional_repositories fields, but none of the applicable solutions have worked. I'm 
pretty sure it's the loading of the citrus package that is causing the error and have 
added the Additional_repositories field with a link the package on Github, but still 
haven't been able to resolve the issue. There are very specific installation 
instructions for the package 
, which may be 
contributing to issues.


How should I properly specify dependencies on the 
nolanlab/citrus Github package for my CRAN 
package?


Thank you in advance,

Allison






  [[alternative HTML version deleted]]

__
R-package-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-package-devel


__
R-package-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-package-devel



__
R-package-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-package-devel


Re: [R-pkg-devel] Errors from Suggests or Enhances not in mainstream repositories

2018-07-02 Thread Ben Bolker
Thanks, Uwe.  Responses inline.

On Mon, Jul 2, 2018 at 6:23 PM Uwe Ligges
 wrote:
>
>
>
> On 03.07.2018 00:13, Ben Bolker wrote:
> > I got something similar.  I have a few thoughts:
> >
> > (1) you should use  "if (require(citrus)) { ... }" in your examples;
> > "Suggests" and "Enhances" packages are supposed to be *optional*, i.e.
> > examples and tests should be able to run even if they're not installed
> > (I would imagine that "Writing R Extensions" and/or the CRAN policies
> > say something to this effect, but I haven't checked)
> > (2) I can imagine that win-builder is looking for *binary* versions of
> > the package (I'm not sure why this would be the default, and why it
> > couldn't fall back and install from source, but that would be my
> > guess); do you have binary versions, for the appropriate major R
> > version (i.e. 3.5 for release, maybe?? 3.4 for oldrelease??), in your
> > repo. (In my example, I don't; I was going to try compiling a binary
> > version and putting it in the repo. This is a bit of a chicken-and-egg
> > problem if you can't get a binary built because the examples fail, but
> > if you implement step #1 I think it should work).
> >
> > My point (3) is a follow-on question that I would love an answer to,
> > or hints. I get a *message* similar to the one found in throm's
> > win-builder logs, i.e. "Suggests or Enhances not in mainstream
> > repositories: ..." - but since it's not labeled as a WARNING or an
> > ERROR (or even a NOTE), I am wondering what its status is in the
> > CRAN-maintainers' eyes - is it a CRAN-submission-blocking problem? Or
> > a "we'd rather you didn't do that but we'll accept it this time?" or
> > ...
>
Uwe> Ideally packages are in mainstream repositories.

  Agreed.

Uwe> For waek dependencies such as Suggests or Enhances, and if the package
Uwe> is in some repository, you can declare it via the
Uwe> Additional_Repositories field.

  I did that (so did the OP). Speaking for myself (since I'm not sure
of the OP's exact situation), I know that the source tarball is in my
repo, and it gets installed successfully on Linux and MacOS. On
Windows (win-builder), the package is not detected in the repo. I can
try adding a Windows binary to the repo to see if that solves the
problem.

  FWIW, one of the off-CRAN packages I Suggest: is INLA (which is
beyond my control). The other is glmmADMB, which includes a binary
blob and can't go on CRAN.  I would like to offer some support for
these packages, if at all possible.

I just don't know if the message about the package *not* being found
in the repo suggested by Additional_repositories: will be
CRAN-blocking (and would prefer not to waste everyone's time by
submitting if it is ...)

Uwe> Finally, if not even in a repository, explain in the Descripton field
Uwe> how to get it.
>
> Best,
> Uwe Ligges
>
> >
> > I'm not asking anyone (except possibly CRAN maintainers) to speak
> > for the CRAN maintainers, but if anyone has any experience or guesses
> > (or pointers to parts of the CRAN policies/Writing R Extensions
> > document that I overlooked) I'd appreciate hearing about it.
> >
> >cheers
> >   Ben Bolker
> > On Mon, Jul 2, 2018 at 5:28 PM Throm, Allison  wrote:
> >>
> >> Hi all,
> >>
> >>
> >> I'm trying to submit a package to the CRAN that further examines results 
> >> from the "citrus" package as done for an accepted publication (available 
> >> on Github: ).
> >>
> >>
> >> I do not get any errors when using devtools::check() on my Mac, which 
> >> already has the citrus package installed. However, I am getting errors 
> >> during the CRAN submission check 
> >> .
> >>
> >>
> >> I've tried searching Stack Overload and other CRAN packages with 
> >> Additional_repositories fields, but none of the applicable solutions have 
> >> worked. I'm pretty sure it's the loading of the citrus package that is 
> >> causing the error and have added the Additional_repositories field with a 
> >> link the package on Github, but still haven't been able to resolve the 
> >> issue. There are very specific installation instructions for the package 
> >> , which may be 
> >> contributing to issues.
> >>
> >>
> >> How should I properly specify dependencies on the 
> >> nolanlab/citrus Github package for my 
> >> CRAN package?
> >>
> >>
> >> Thank you in advance,
> >>
> >> Allison
> >>
> >>
> >>
> >>
> >>
> >>
> >>  [[alternative HTML version deleted]]
> >>
> >> __
> >> R-package-devel@r-project.org mailing list
> >> https://stat.ethz.ch/mailman/listinfo/r-package-devel
> >
> > __
> > R-package-devel@r-project.org mailing list
> > https://stat.ethz.ch/mailman/listinfo/r-package-devel
> >


Re: [R-pkg-devel] Errors from Suggests or Enhances not in mainstream repositories

2018-07-02 Thread Uwe Ligges




On 03.07.2018 00:13, Ben Bolker wrote:

I got something similar.  I have a few thoughts:

(1) you should use  "if (require(citrus)) { ... }" in your examples;
"Suggests" and "Enhances" packages are supposed to be *optional*, i.e.
examples and tests should be able to run even if they're not installed
(I would imagine that "Writing R Extensions" and/or the CRAN policies
say something to this effect, but I haven't checked)
(2) I can imagine that win-builder is looking for *binary* versions of
the package (I'm not sure why this would be the default, and why it
couldn't fall back and install from source, but that would be my
guess); do you have binary versions, for the appropriate major R
version (i.e. 3.5 for release, maybe?? 3.4 for oldrelease??), in your
repo. (In my example, I don't; I was going to try compiling a binary
version and putting it in the repo. This is a bit of a chicken-and-egg
problem if you can't get a binary built because the examples fail, but
if you implement step #1 I think it should work).

My point (3) is a follow-on question that I would love an answer to,
or hints. I get a *message* similar to the one found in throm's
win-builder logs, i.e. "Suggests or Enhances not in mainstream
repositories: ..." - but since it's not labeled as a WARNING or an
ERROR (or even a NOTE), I am wondering what its status is in the
CRAN-maintainers' eyes - is it a CRAN-submission-blocking problem? Or
a "we'd rather you didn't do that but we'll accept it this time?" or
...


Ideally packages are in mainstream repositories.
For waek dependencies such as Suggests or Enhances, and if the package 
is in some repository, you can declare it via the 
Additional_Repositories field.
Finally, if not even in a repository, explain in the Descripton field 
how to get it.


Best,
Uwe Ligges



I'm not asking anyone (except possibly CRAN maintainers) to speak
for the CRAN maintainers, but if anyone has any experience or guesses
(or pointers to parts of the CRAN policies/Writing R Extensions
document that I overlooked) I'd appreciate hearing about it.

   cheers
  Ben Bolker
On Mon, Jul 2, 2018 at 5:28 PM Throm, Allison  wrote:


Hi all,


I'm trying to submit a package to the CRAN that further examines results from the 
"citrus" package as done for an accepted publication (available on Github: 
).


I do not get any errors when using devtools::check() on my Mac, which already has the 
citrus package installed. However, I am getting errors during the CRAN submission 
check 
.


I've tried searching Stack Overload and other CRAN packages with 
Additional_repositories fields, but none of the applicable solutions have worked. I'm 
pretty sure it's the loading of the citrus package that is causing the error and have 
added the Additional_repositories field with a link the package on Github, but still 
haven't been able to resolve the issue. There are very specific installation 
instructions for the package 
, which may be 
contributing to issues.


How should I properly specify dependencies on the 
nolanlab/citrus Github package for my CRAN 
package?


Thank you in advance,

Allison






 [[alternative HTML version deleted]]

__
R-package-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-package-devel


__
R-package-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-package-devel



__
R-package-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-package-devel


Re: [R-pkg-devel] Errors from Suggests or Enhances not in mainstream repositories

2018-07-02 Thread Ben Bolker
I got something similar.  I have a few thoughts:

(1) you should use  "if (require(citrus)) { ... }" in your examples;
"Suggests" and "Enhances" packages are supposed to be *optional*, i.e.
examples and tests should be able to run even if they're not installed
(I would imagine that "Writing R Extensions" and/or the CRAN policies
say something to this effect, but I haven't checked)
(2) I can imagine that win-builder is looking for *binary* versions of
the package (I'm not sure why this would be the default, and why it
couldn't fall back and install from source, but that would be my
guess); do you have binary versions, for the appropriate major R
version (i.e. 3.5 for release, maybe?? 3.4 for oldrelease??), in your
repo. (In my example, I don't; I was going to try compiling a binary
version and putting it in the repo. This is a bit of a chicken-and-egg
problem if you can't get a binary built because the examples fail, but
if you implement step #1 I think it should work).

My point (3) is a follow-on question that I would love an answer to,
or hints. I get a *message* similar to the one found in throm's
win-builder logs, i.e. "Suggests or Enhances not in mainstream
repositories: ..." - but since it's not labeled as a WARNING or an
ERROR (or even a NOTE), I am wondering what its status is in the
CRAN-maintainers' eyes - is it a CRAN-submission-blocking problem? Or
a "we'd rather you didn't do that but we'll accept it this time?" or
...

   I'm not asking anyone (except possibly CRAN maintainers) to speak
for the CRAN maintainers, but if anyone has any experience or guesses
(or pointers to parts of the CRAN policies/Writing R Extensions
document that I overlooked) I'd appreciate hearing about it.

  cheers
 Ben Bolker
On Mon, Jul 2, 2018 at 5:28 PM Throm, Allison  wrote:
>
> Hi all,
>
>
> I'm trying to submit a package to the CRAN that further examines results from 
> the "citrus" package as done for an accepted publication (available on 
> Github: ).
>
>
> I do not get any errors when using devtools::check() on my Mac, which already 
> has the citrus package installed. However, I am getting errors during the 
> CRAN submission check 
> .
>
>
> I've tried searching Stack Overload and other CRAN packages with 
> Additional_repositories fields, but none of the applicable solutions have 
> worked. I'm pretty sure it's the loading of the citrus package that is 
> causing the error and have added the Additional_repositories field with a 
> link the package on Github, but still haven't been able to resolve the issue. 
> There are very specific installation instructions for the package 
> , which may be 
> contributing to issues.
>
>
> How should I properly specify dependencies on the 
> nolanlab/citrus Github package for my 
> CRAN package?
>
>
> Thank you in advance,
>
> Allison
>
>
>
>
>
>
> [[alternative HTML version deleted]]
>
> __
> R-package-devel@r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-package-devel

__
R-package-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-package-devel


[R-pkg-devel] Errors from Suggests or Enhances not in mainstream repositories

2018-07-02 Thread Throm, Allison
Hi all,


I'm trying to submit a package to the CRAN that further examines results from 
the "citrus" package as done for an accepted publication (available on Github: 
).


I do not get any errors when using devtools::check() on my Mac, which already 
has the citrus package installed. However, I am getting errors during the CRAN 
submission check 
.


I've tried searching Stack Overload and other CRAN packages with 
Additional_repositories fields, but none of the applicable solutions have 
worked. I'm pretty sure it's the loading of the citrus package that is causing 
the error and have added the Additional_repositories field with a link the 
package on Github, but still haven't been able to resolve the issue. There are 
very specific installation instructions for the package 
, which may be 
contributing to issues.


How should I properly specify dependencies on the 
nolanlab/citrus Github package for my CRAN 
package?


Thank you in advance,

Allison






[[alternative HTML version deleted]]

__
R-package-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-package-devel