Skip to content

[Bioc-devel] Runnable examples

4 messages · Octavio Morante Palacios, Nitesh Turaga, Martin Morgan

#
Hi all,

I have recently developed a shinyApp useful for DNA methylation analysis. I
would like to upload it to Bioconductor.

I have executed BiocCheck and I have an error that I don't know how to
resolve. "At least 80% of man pages documenting exported objects must have
runnable examples."

My package only exports one function, that execute the ShinyApp. I don't
know how to include runnable examples to that kind of function.

Best regards,
Octavio
#
Hi,

If you are using roxygen, you can include a \donttest{} block. But this will still produce the error if it?s less than 80%.

Once you submit your package for review, your reviewer can give you a better idea of how to resolve this issue. But most likely it needs some sort of example. 

Take a look at the iSEE package which is also a shiny app (https://github.com/iSEE/iSEE/blob/master/R/iSEE-main.R <https://github.com/iSEE/iSEE/blob/master/R/iSEE-main.R>) for some ideas.

But maybe you can do something like,

	  #? @examples
if (interactive()) {
   runApp(app)
}

Best,

Nitesh

  
  
#
My view of shiny applications is that they should provide a graphical interface to sequences of commands that can be run at the command line. As such, the commands themselves should be part of a standard R package, with appropriate examples, tests, and documentation, including a vignette illustrating their use at the command line. 

One could differentiate the command to launch the shiny app from the 'internal' but exported functions that the shiny app is based upon in various ways, e.g., by prefacing the internal commands with a '.' or other prefix.

Presumably there are several functions that the shiny app encapsulates so that, by the time these are documented and tested, the requirement that 80% of man pages have such examples will be satisfied.

Martin Morgan

?On 8/6/20, 8:32 AM, "Bioc-devel on behalf of Nitesh Turaga" <bioc-devel-bounces at r-project.org on behalf of nturaga.bioc at gmail.com> wrote:

    Hi,

    If you are using roxygen, you can include a \donttest{} block. But this will still produce the error if it?s less than 80%.

    Once you submit your package for review, your reviewer can give you a better idea of how to resolve this issue. But most likely it needs some sort of example. 

    Take a look at the iSEE package which is also a shiny app (https://github.com/iSEE/iSEE/blob/master/R/iSEE-main.R <https://github.com/iSEE/iSEE/blob/master/R/iSEE-main.R>) for some ideas.

    But maybe you can do something like,

    	  #? @examples
    if (interactive()) {
       runApp(app)
    }

    Best,

    Nitesh
> On Aug 6, 2020, at 8:06 AM, Octavio Morante Palacios <octaviompa at gmail.com> wrote:
> 
    > Hi all,
    > 
    > I have recently developed a shinyApp useful for DNA methylation analysis. I
    > would like to upload it to Bioconductor.
    > 
    > I have executed BiocCheck and I have an error that I don't know how to
    > resolve. "At least 80% of man pages documenting exported objects must have
    > runnable examples."
    > 
    > My package only exports one function, that execute the ShinyApp. I don't
    > know how to include runnable examples to that kind of function.
    > 
    > Best regards,
    > Octavio
    > 
    > 	[[alternative HTML version deleted]]
    > 
    > _______________________________________________
    > Bioc-devel at r-project.org mailing list
    > https://stat.ethz.ch/mailman/listinfo/bioc-devel



    _______________________________________________
    Bioc-devel at r-project.org mailing list
    https://stat.ethz.ch/mailman/listinfo/bioc-devel
#
Thank you for the suggestions.

I will have a look to other shiny packages as you suggested. I think it is
a good idea to export also the functions used by the shiny App and make
possible to follow the pipeline also through command line. Nowadays my app
is very focus on the graphical side.

Best regards!
Octavio.


El jue., 6 ago. 2020 17:44, Martin Morgan <mtmorgan.bioc at gmail.com>
escribi?: