[Rd] declaring dependencies of shiny app in inst/

Jombart, Thibaut t.jombart at imperial.ac.uk
Wed Aug 26 12:43:35 CEST 2015

Dear all, 

I have a package implementing a shiny app, putting the R code of the app (server.R and ui.R) in inst/... and then having a simple function merely starting the app with something along the lines of:

However, the app itself uses functions from packages which are not used elsewhere in the code. What is the best way to declare these dependencies (using roxygen2)? My 2-cents would be e.g a doc.R file with something along the lines of:
#' @importFrom pkg function1 function2

But are their better ways / best practices?

On a related topic: are there plans of formally incorporating shiny apps in the structure of a R package, so that the checks will run through the code of the apps as well? 


Dr Thibaut Jombart
MRC Centre for Outbreak Analysis and Modelling
Department of Infectious Disease Epidemiology
Imperial College - School of Public Health
Norfolk Place, London W2 1PG, UK
Tel. : 0044 (0)20 7594 3658
Twitter: @thibautjombart

More information about the R-devel mailing list