My question is related to this question except that I'm looking to apply this specifically within a package that I am building. As such, I don't call library()
to bring in packages my package depends on, but I am using the following roxygen2
setup (as an example):
#' @rawNamespace import(shiny, except = c(dataTableOutput, renderDataTable))
#' @import dplyr
#' @importFrom ggalt stat_xspline
My problem is that calling the ggalt
package brings in the following undesirable message into the console when my package is loaded, and I would like R to suppress this:
Registered S3 methods overwritten by 'ggalt':
method from
grid.draw.absoluteGrob ggplot2
grobHeight.absoluteGrob ggplot2
grobWidth.absoluteGrob ggplot2
grobX.absoluteGrob ggplot2
grobY.absoluteGrob ggplot2
As per the question I linked above, I could use suppressMessages()
if I were calling that package using library()
. But would I do so within the roxygen2
infrastructure? Is it possible to apply this within the #' @rawNamespace import()
line somehow? I'm having trouble finding documentation about what arguments this function provides other than except
.
I also note this question, but this seems more focused on the package development stage, whereas my issue is more for the end-user of my completed package having the message suppressed.