This is not the best question of mine, but I do not know how to ask. Moreover I can't provide a working example.
I try to create a package of my R shiny app within the golem
framework.
And I already achieved to create a package and it worked very well.
But honestly I do not have good control about things that happen.
For example What does these warnings mean? Why they occur? And why they are doubled? How can I avoid them?
Warning messages:
1: replacing previous import ‘bs4Dash::insertTab’ by ‘shiny::insertTab’ when loading ‘blabla’
2: replacing previous import ‘bs4Dash::actionButton’ by ‘shiny::actionButton’ when loading ‘blabla’
3: replacing previous import ‘bs4Dash::tabsetPanel’ by ‘shiny::tabsetPanel’ when loading ‘blabla’
4: replacing previous import ‘bs4Dash::column’ by ‘shiny::column’ when loading ‘blabla’
5: replacing previous import ‘shiny::runExample’ by ‘shinyscreenshot::runExample’ when loading ‘blabla’
6: replacing previous import ‘bs4Dash::insertTab’ by ‘shiny::insertTab’ when loading ‘blabla’
7: replacing previous import ‘bs4Dash::actionButton’ by ‘shiny::actionButton’ when loading ‘blabla’
8: replacing previous import ‘bs4Dash::tabsetPanel’ by ‘shiny::tabsetPanel’ when loading ‘blabla’
9: replacing previous import ‘bs4Dash::column’ by ‘shiny::column’ when loading ‘blabla’
10: replacing previous import ‘shiny::runExample’ by ‘shinyscreenshot::runExample’ when loading ‘blabla’
My NAMESPACE.R
export(run_app)
import(bs4Dash)
import(fontawesome)
import(grDevices)
import(markdown)
import(pkgload)
import(radarchart)
import(rmarkdown)
import(shiny)
import(shinyscreenshot)
import(shinythemes)
importFrom(golem,activate_js)
importFrom(golem,add_resource_path)
importFrom(golem,bundle_resources)
importFrom(golem,favicon)
importFrom(golem,with_golem_options)
importFrom(shiny,shinyApp)
The app_ui.R starts with:
#' The application User-Interface
#'
#' @param request Internal parameter for `{shiny}`.
#' DO NOT REMOVE.
#' @import bs4Dash
#' @import shinythemes
#' @import radarchart
#' @import shinyscreenshot
#' @import rmarkdown
#' @import markdown
#' @import fontawesome
#' @import pkgload
#' @import grDevices
#' @noRd
....
I would be grateful for any directing hint.
I already solved the warning for DT
with this https://github.com/HelBor/wpm/issues/27 so the warning does not occur anymore?
These warnings mean that you are using the packages like 'bs4Dash' and 'shiny' that have functions with common names, so you need to decide which function to consider from the packages, sometime you may want to consider one function from 'shiny' and another from 'bs4Dash'. so to warnings you need to update the roxygen2 header as below
in the example below i want to get the 'insertTab' function from 'bs4Dash' and all other functions from 'shiny' and accordingly i updated the header @import and @importFrom
#' The application User-Interface
#'
#' @param request Internal parameter for `{shiny}`.
#' DO NOT REMOVE.
#' @import bs4Dash
#' @import shiny
#' @import shinythemes
#' @import radarchart
#' @import shinyscreenshot
#' @import rmarkdown
#' @import markdown
#' @import fontawesome
#' @import pkgload
#' @import grDevices
#' @importFrom bs4Dash insertTab
#' @importFrom shiny actionButton tabsetPanel column runExample
#' @noRd