The size of shiny app is a sum of dependencies packages and the app directory. The app dependencies packages are checked recursively, and only in local repository. The default arguments setup is recommended.
Arguments
- path
characterpath to the shiny app. Default:"."- fields
charactervector listing the types of dependencies, a subset ofc("Depends", "Imports", "LinkingTo", "Suggests", "Enhances"). Character string "all" is shorthand for that vector, character string "most" for the same vector without "Enhances", character string "strong" (default) for the first three elements of that vector. Default:c("Depends", "Imports", "LinkingTo")- lib.loc
charactervector of search paths with local packages. Default:.libPaths()- recursive
logicalif to assess the dependencies recursively. Default: TRUE
Value
numeric size in bytes, or NA if dependencies cannot be
determined. To get MB, divide by 10**6.
Note
renv package has to be installed. base packages (pacs::pacs_base()) are not taken into account.
Examples
if (FALSE) { # \dontrun{
library(renv)
# Please update the path to the shiny app
cat(pacs::app_size(system.file("examples/04_mpg", package = "shiny")) / 10**6, "MB")
} # }