Should mgcv be in Imports: rather than just Suggests: ?

24 views
Skip to first unread message

Hugh Parsonage

unread,
Jan 5, 2018, 8:04:13 AM1/5/18
to ggplot2
I have a package that Suggests: ggplot2 for a vignette. I got an email from Prof. Ripley notifying me that my package is currently failing R CMD check because of an unstated dependency on mgcv:

>  Quitting from lines 437-441 (companion-to-sample-file-1314.Rmd) 
>    Error: processing vignette 'companion-to-sample-file-1314.Rmd' failed with diagnostics:
>   there is no package called 'mgcv'
(https://cran.r-project.org/web/checks/check_results_grattan.html)

The failure occurs because I use `geom_smooth()` which in that context invokes mgcv, but mgcv is not listed in Imports: so CRAN does not install it when it installs ggplot2. I know I can just put mgcv in Suggests, but I wonder whether the problem might be with ggplot2.

(Asking here, not on GitHub, because it's a question.)

Hadley Wickham

unread,
Jan 5, 2018, 8:31:47 AM1/5/18
to Hugh Parsonage, ggplot2
You should put mgcv in suggests, since you're using it.
Hadley

--
--
You received this message because you are subscribed to the ggplot2 mailing list.
Please provide a reproducible example: https://github.com/hadley/devtools/wiki/Reproducibility
 
To post: email ggp...@googlegroups.com
To unsubscribe: email ggplot2+unsubscribe@googlegroups.com
More options: http://groups.google.com/group/ggplot2

---
You received this message because you are subscribed to the Google Groups "ggplot2" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ggplot2+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--

Hugh Parsonage

unread,
Jan 5, 2018, 8:51:44 AM1/5/18
to ggplot2
Sure, but why does geom_smooth() not work without package:mgcv, even though it's not in ggplot2's Depends: or Imports:? If a package uses ggplot2 in vignettes, does it have to Suggest: all of the packages in ggplot2's Suggests?



On Saturday, 6 January 2018 00:31:47 UTC+11, Hadley Wickham wrote:
You should put mgcv in suggests, since you're using it.
Hadley
On Fri, Jan 5, 2018 at 6:39 AM, Hugh Parsonage <hugh.pa...@gmail.com> wrote:
I have a package that Suggests: ggplot2 for a vignette. I got an email from Prof. Ripley notifying me that my package is currently failing R CMD check because of an unstated dependency on mgcv:

>  Quitting from lines 437-441 (companion-to-sample-file-1314.Rmd) 
>    Error: processing vignette 'companion-to-sample-file-1314.Rmd' failed with diagnostics:
>   there is no package called 'mgcv'
(https://cran.r-project.org/web/checks/check_results_grattan.html)

The failure occurs because I use `geom_smooth()` which in that context invokes mgcv, but mgcv is not listed in Imports: so CRAN does not install it when it installs ggplot2. I know I can just put mgcv in Suggests, but I wonder whether the problem might be with ggplot2.

(Asking here, not on GitHub, because it's a question.)

--
--
You received this message because you are subscribed to the ggplot2 mailing list.
Please provide a reproducible example: https://github.com/hadley/devtools/wiki/Reproducibility
 
To post: email ggp...@googlegroups.com
To unsubscribe: email ggplot2+u...@googlegroups.com

More options: http://groups.google.com/group/ggplot2

---
You received this message because you are subscribed to the Google Groups "ggplot2" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ggplot2+u...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

Hadley Wickham

unread,
Jan 5, 2018, 3:35:36 PM1/5/18
to Hugh Parsonage, ggplot2
No, just the packages it actually uses.
Hadley


More options: http://groups.google.com/group/ggplot2

---
You received this message because you are subscribed to the Google Groups "ggplot2" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ggplot2+unsubscribe@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages