Re: [Bioc-devel] 80% of man pages must have runnable examples (package with numerous Shiny apps)

2018-11-19 Thread Kevin RUE
Hi Lindsay,

Check out https://github.com/csoneson/iSEE/blob/master/R/iSEE-main.R
function "iSEE" for an example of both the function return value, and the
man page.

First, I would suggest that your function _returns_ the "appDir" object to
the user, and that you leave it to the user to call "shiny::runApp" with
options appropriate to their system or preferences (e.g
launch.browser=FALSE, port=1234, etc).

Second, for the man page, you don't have to put the _entire_ @example block
inside \dontrun{}. You can put everything that doesn't launch the Shiny app
outside the \dontrun{} block and only put the one "shiny" line inside the
\dontrun{}. The one line will represent less than 80% of the man page.

However, even better, you can avoid the \dontrun{} option altogether and
put the "shiny" statement within a "if (interactive()) { ... }" block.

So adapting you existing code, I would have
#' @examples
#' # Example 1: Create an interactive litre plot for the logged data using
#' # default background of hexagons.
#'
#' data(soybean_ir_sub)
#' data(soybean_ir_sub_metrics)
#' soybean_ir_sub_log <- soybean_ir_sub
#' soybean_ir_sub_log[,-1] <- log(soybean_ir_sub[,-1]+1)
#' if (interactive()){
#' plotLitreApp(data = soybean_ir_sub_log, dataMetrics =
soybean_ir_sub_metrics)
#' }
#'
#' # Example 2: Repeat the same process, only now plot background data as
#' # individual points. Note this may be too slow now that all points are
drawn
#' # in the background.
#' if (interactive()){
#' plotLitreApp(data = soybean_ir_sub_log, dataMetrics =
soybean_ir_sub_metrics,
#' option = "allPoints", pointColor = "red")
#' }

However, once more, I suggest that you return "appDir", and you would then
have something like:
#' app <- plotLitreApp(data = soybean_ir_sub_log, dataMetrics =
soybean_ir_sub_metrics)
#' if (interactive()){
#'shiny::runApp(app, [options defined by your user])
#' }

I hope this helps. Otherwise, let me know and I can chime in the review of
your package

Best wishes
Kevin

On Mon, Nov 19, 2018 at 7:00 PM Shepherd, Lori <
lori.sheph...@roswellpark.org> wrote:

> Submit with the dontrun{} and temporarily ignore the ERROR -  when
> submitting please reference the explanation below.  Your reviewer could
> provide more information and will decide how to proceed -  generally
> examples will be run manually to check for accuracy and an exception can be
> made.
>
>
> Lori Shepherd
>
> Bioconductor Core Team
>
> Roswell Park Cancer Institute
>
> Department of Biostatistics & Bioinformatics
>
> Elm & Carlton Streets
>
> Buffalo, New York 14263
>
> 
> From: Bioc-devel  on behalf of L Rutter
> 
> Sent: Monday, November 19, 2018 1:49:50 PM
> To: bioc-devel@r-project.org
> Subject: [Bioc-devel] 80% of man pages must have runnable examples
> (package with numerous Shiny apps)
>
> Hello all:
>
> I am planning to submit a package to Bioconductor and have one last
> item from BiocCheck (error, warning, note) I have been unable to
> resolve:
>
> ERROR: At least 80% of man pages documenting exported objects must
> have runnable examples. The following pages do not: plotLitreApp.Rd,
> plotPCPApp.Rd, plotSMApp.Rd, plotVolcanoApp.Rd
>
> I have 18 man pages (9 function-related, 8 data-related, and 1
> package-related). Of these, 4 of the function-related man pages (the
> ones listed in the ERROR) are Shiny applications of the following
> format:
>
> appDir <- system.file("shiny-examples", "plotLitreApp", package =
> "bigPint")
> shiny::runApp(appDir, display.mode = "normal")
>
> If I do not have \dontrun{} around these shiny app examples, then R
> CMD check permanently halts on the "checking examples..." step. If I
> do have \dontrun{} around these shiny app examples, then R CMD
> BiocCheck gives me the error above. My question is: What is the
> recommended procedure in such a situation where the package is being
> prepared for Bioconductor submission?
>
> An example of one script causing the error can be found at:
> https://github.com/lrutter/bigPint/blob/master/R/plotLitreApp.R
>
> Thank you for any advice!
> Lindsay
>
> ___
> Bioc-devel@r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/bioc-devel
>
>
> This email message may contain legally privileged and/or confidential
> information.  If you are not the intended recipient(s), or the employee or
> agent responsible for the delivery of this message to the intended
> recipient(s), you are hereby notified that any disclosure, copying,
> distribution, or use of this email message is prohibited.  If you have
> received this message in error, please notify the sender immediately by
> e-mail and delete this email message from your computer. Thank you.
> [[alternative HTML version deleted]]
>
> ___
> Bioc-devel@r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/bioc-devel
>

[[alternative HTML version deleted]]


Re: [Bioc-devel] 80% of man pages must have runnable examples (package with numerous Shiny apps)

2018-11-19 Thread Shepherd, Lori
Submit with the dontrun{} and temporarily ignore the ERROR -  when submitting 
please reference the explanation below.  Your reviewer could provide more 
information and will decide how to proceed -  generally examples will be run 
manually to check for accuracy and an exception can be made.


Lori Shepherd

Bioconductor Core Team

Roswell Park Cancer Institute

Department of Biostatistics & Bioinformatics

Elm & Carlton Streets

Buffalo, New York 14263


From: Bioc-devel  on behalf of L Rutter 

Sent: Monday, November 19, 2018 1:49:50 PM
To: bioc-devel@r-project.org
Subject: [Bioc-devel] 80% of man pages must have runnable examples (package 
with numerous Shiny apps)

Hello all:

I am planning to submit a package to Bioconductor and have one last
item from BiocCheck (error, warning, note) I have been unable to
resolve:

ERROR: At least 80% of man pages documenting exported objects must
have runnable examples. The following pages do not: plotLitreApp.Rd,
plotPCPApp.Rd, plotSMApp.Rd, plotVolcanoApp.Rd

I have 18 man pages (9 function-related, 8 data-related, and 1
package-related). Of these, 4 of the function-related man pages (the
ones listed in the ERROR) are Shiny applications of the following
format:

appDir <- system.file("shiny-examples", "plotLitreApp", package = "bigPint")
shiny::runApp(appDir, display.mode = "normal")

If I do not have \dontrun{} around these shiny app examples, then R
CMD check permanently halts on the "checking examples..." step. If I
do have \dontrun{} around these shiny app examples, then R CMD
BiocCheck gives me the error above. My question is: What is the
recommended procedure in such a situation where the package is being
prepared for Bioconductor submission?

An example of one script causing the error can be found at:
https://github.com/lrutter/bigPint/blob/master/R/plotLitreApp.R

Thank you for any advice!
Lindsay

___
Bioc-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/bioc-devel


This email message may contain legally privileged and/or confidential 
information.  If you are not the intended recipient(s), or the employee or 
agent responsible for the delivery of this message to the intended 
recipient(s), you are hereby notified that any disclosure, copying, 
distribution, or use of this email message is prohibited.  If you have received 
this message in error, please notify the sender immediately by e-mail and 
delete this email message from your computer. Thank you.
[[alternative HTML version deleted]]

___
Bioc-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/bioc-devel


[Bioc-devel] 80% of man pages must have runnable examples (package with numerous Shiny apps)

2018-11-19 Thread L Rutter
Hello all:

I am planning to submit a package to Bioconductor and have one last
item from BiocCheck (error, warning, note) I have been unable to
resolve:

ERROR: At least 80% of man pages documenting exported objects must
have runnable examples. The following pages do not: plotLitreApp.Rd,
plotPCPApp.Rd, plotSMApp.Rd, plotVolcanoApp.Rd

I have 18 man pages (9 function-related, 8 data-related, and 1
package-related). Of these, 4 of the function-related man pages (the
ones listed in the ERROR) are Shiny applications of the following
format:

appDir <- system.file("shiny-examples", "plotLitreApp", package = "bigPint")
shiny::runApp(appDir, display.mode = "normal")

If I do not have \dontrun{} around these shiny app examples, then R
CMD check permanently halts on the "checking examples..." step. If I
do have \dontrun{} around these shiny app examples, then R CMD
BiocCheck gives me the error above. My question is: What is the
recommended procedure in such a situation where the package is being
prepared for Bioconductor submission?

An example of one script causing the error can be found at:
https://github.com/lrutter/bigPint/blob/master/R/plotLitreApp.R

Thank you for any advice!
Lindsay

___
Bioc-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/bioc-devel