From t.jombart at imperial.ac.uk  Wed Aug 26 12:43:35 2015
From: t.jombart at imperial.ac.uk (Jombart, Thibaut)
Date: Wed, 26 Aug 2015 10:43:35 +0000
Subject: [Rd] declaring dependencies of shiny app in inst/
Message-ID: <2CB2DA8E426F3541AB1907F98ABA6570B128F718@icexch-m1.ic.ac.uk>

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:
runApp(system.file("inst/..."))

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
NULL

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? 

Cheers
Thibaut

==============================
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
http://sites.google.com/site/thibautjombart/
http://sites.google.com/site/therepiproject/
http://adegenet.r-forge.r-project.org/
Twitter: @thibautjombart








[Rd] declaring dependencies of shiny app in inst/
Jombart, Thibaut