Hello all:
R CMD check does not complete for my package and halts at the line "*
checking examples ..." I suspect the halting is due to @examples
hanging in certain R/foo.R files, where shiny::runApp() is called for
a shiny app located in a separate directory in this type of format:
appDir <- system.file("shiny-examples", "plotLitreApp", package = "bigPint")
shiny::runApp(appDir, display.mode = "normal")
I suspect this is the problem because I previously had \dontrun{}
around my @examples that used shiny apps and R CMD check worked fine.
When I run the example code for these shiny apps directly into R, the
shiny app works no problem. An example of one such R/foo.R file
causing this hanging problem is located in the developing package at:
https://github.com/lrutter/bigPint/blob/master/R/plotLitreApp.R
Any advice on how to successfully use the @examples for this script
and not halt R CMD check would be much appreciated!
Thank you!...
Lindsay
[R-pkg-devel] R CMD check halts on @example in shiny::runApp()
4 messages · Joris Meys, L Rutter, Hadley Wickham
Hi Lindsay,
this is normal and to be expected, as shiny blocks R and shifts focus to
the browser. This only makes sense in interactive modus, as your app needs
input from a user before it does anything.
So for your shiny examples, you always have to use \dontrun{}.
Cheers
Joris
On Mon, Nov 19, 2018 at 3:14 PM L Rutter <lindsayannerutter at gmail.com>
wrote:
Hello all:
R CMD check does not complete for my package and halts at the line "*
checking examples ..." I suspect the halting is due to @examples
hanging in certain R/foo.R files, where shiny::runApp() is called for
a shiny app located in a separate directory in this type of format:
appDir <- system.file("shiny-examples", "plotLitreApp", package =
"bigPint")
shiny::runApp(appDir, display.mode = "normal")
I suspect this is the problem because I previously had \dontrun{}
around my @examples that used shiny apps and R CMD check worked fine.
When I run the example code for these shiny apps directly into R, the
shiny app works no problem. An example of one such R/foo.R file
causing this hanging problem is located in the developing package at:
https://github.com/lrutter/bigPint/blob/master/R/plotLitreApp.R
Any advice on how to successfully use the @examples for this script
and not halt R CMD check would be much appreciated!
Thank you!...
Lindsay
______________________________________________ R-package-devel at r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-package-devel
Joris Meys Statistical consultant Department of Data Analysis and Mathematical Modelling Ghent University Coupure Links 653, B-9000 Gent (Belgium) <https://maps.google.com/?q=Coupure+links+653,%C2%A0B-9000+Gent,%C2%A0Belgium&entry=gmail&source=g> tel: +32 (0)9 264 61 79 ----------- Biowiskundedagen 2017-2018 http://www.biowiskundedagen.ugent.be/ ------------------------------- Disclaimer : http://helpdesk.ugent.be/e-maildisclaimer.php [[alternative HTML version deleted]]
Hi Joris Meys:
Thank you for your helpful response and confirmation that \dontrun{}
is necessary for shiny examples.
Lindsay
On Mon, Nov 19, 2018 at 10:17 AM Joris Meys <Joris.Meys at ugent.be> wrote:
Hi Lindsay,
this is normal and to be expected, as shiny blocks R and shifts focus to the browser. This only makes sense in interactive modus, as your app needs input from a user before it does anything.
So for your shiny examples, you always have to use \dontrun{}.
Cheers
Joris
On Mon, Nov 19, 2018 at 3:14 PM L Rutter <lindsayannerutter at gmail.com> wrote:
Hello all:
R CMD check does not complete for my package and halts at the line "*
checking examples ..." I suspect the halting is due to @examples
hanging in certain R/foo.R files, where shiny::runApp() is called for
a shiny app located in a separate directory in this type of format:
appDir <- system.file("shiny-examples", "plotLitreApp", package = "bigPint")
shiny::runApp(appDir, display.mode = "normal")
I suspect this is the problem because I previously had \dontrun{}
around my @examples that used shiny apps and R CMD check worked fine.
When I run the example code for these shiny apps directly into R, the
shiny app works no problem. An example of one such R/foo.R file
causing this hanging problem is located in the developing package at:
https://github.com/lrutter/bigPint/blob/master/R/plotLitreApp.R
Any advice on how to successfully use the @examples for this script
and not halt R CMD check would be much appreciated!
Thank you!...
Lindsay
______________________________________________ R-package-devel at r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-package-devel
-- Joris Meys Statistical consultant Department of Data Analysis and Mathematical Modelling Ghent University Coupure Links 653, B-9000 Gent (Belgium) tel: +32 (0)9 264 61 79 ----------- Biowiskundedagen 2017-2018 http://www.biowiskundedagen.ugent.be/ ------------------------------- Disclaimer : http://helpdesk.ugent.be/e-maildisclaimer.php
On Mon, Nov 19, 2018 at 8:14 AM L Rutter <lindsayannerutter at gmail.com> wrote:
Hello all:
R CMD check does not complete for my package and halts at the line "*
checking examples ..." I suspect the halting is due to @examples
hanging in certain R/foo.R files, where shiny::runApp() is called for
a shiny app located in a separate directory in this type of format:
appDir <- system.file("shiny-examples", "plotLitreApp", package = "bigPint")
shiny::runApp(appDir, display.mode = "normal")
I suspect this is the problem because I previously had \dontrun{}
around my @examples that used shiny apps and R CMD check worked fine.
When I run the example code for these shiny apps directly into R, the
shiny app works no problem. An example of one such R/foo.R file
causing this hanging problem is located in the developing package at:
https://github.com/lrutter/bigPint/blob/master/R/plotLitreApp.R
Any advice on how to successfully use the @examples for this script
and not halt R CMD check would be much appreciated!
One option is to use interactive:
if (interactive()) {
runApp()
}
That way it won't run in R CMD check, but it will run from example()
Hadley