mthrun
mthrun

Reputation: 71

Building R package "no visible global function definition for" shiny functions

Im trying to check my own package with

Rcmd.exe check dbt.ORA_1.0.tar.gz.

despite of adding "Depends: shiny in the Description file,

I get alot of warnings like this:

...

...

the function dbtORA is very long, the source code is like this:

dbtORA <-function(){
...
outputApp=runApp(list(
  ui = fluidPage(
...
),
 server = function(input, output, session){
...
  }  
))
...
return(outputApp=NamedORAResults)}

I have in this context also a second question:

How do I declare functions, which are only locally defined, e.g. in

dbtORA <-function(){
...
matlabmin=function(...){...}
...}

gives the warning:

Upvotes: 3

Views: 5177

Answers (1)

mthrun
mthrun

Reputation: 71

For all of you, who have the same problem:

  1. In the DESCRIPTION file you have to write

    Imports: shiny

    and not

    Depends: shiny

  2. In the NAMESPACE file you have to write

    import(shiny)
    

No clue, why it has to be done like this only with shiny...

Upvotes: 2

Related Questions