[R-pkg-devel] Listing a package in "Imports:" when it's used outside of "R" directory

Dirk Eddelbuettel edd at debian.org
Sat Aug 15 14:35:18 CEST 2015

On 14 August 2015 at 23:36, Dean Attali wrote:
| Since the Shiny app is an integral part of the package, and the app uses the
| "DT" package, I want to place DT under the Imports: field. But then I ran
| into the above error.

The code checkers are heuristics.  They cannot get everything right.

If this is what you want, why not make it so -- maybe by adding an 'empty'
call into a DT function not used.  Eg



     nevercalled <- function(filename) {
          ignored <- data.table::fread(filename)

should do.
| I know I can get rid of the problem by placing the entire shiny app in the R
| folder, but it's a large app and it seems like separating it and having it
| under inst/shiny makes more sense.

Why?  It is still in the package.  Maybe make the shiny app a package itself
and add Suggests: on it?

http://dirk.eddelbuettel.com | @eddelbuettel | edd at debian.org

More information about the R-package-devel mailing list