deployApp() installs unnecessary packages

45 views
Skip to first unread message

Homer White

unread,
Jun 13, 2015, 2:18:16 PM6/13/15
to shinyap...@googlegroups.com

I have an app repo that contains some R Markdown files. I use these to generate (locally) some html files that are to be read in by the that app:

homer.shinyapp.io/example_sim_07

I notice that when I inlcuded a library call to a package in one of these files, deployApp() indicated the package and its dependencies were being installed in the app:

Deploying application: 46257...
Waiting for task: 42548488
  building: Parsing manifest
  building: Building image: 198435
  building: Installing system dependencies
  building: Fetching packages
  building: Building package: mosaicData
  building: Building package: mosaic
  building: Building package: abd
  building: Building package: tigerstats
  building: Installing packages
  building: Installing files
  building: Pushing image: 198435
  deploying: Starting instances
  rollforward: Activating new instances
  terminating: Stopping old instances
Application successfully deployed to https://homer.shinyapps.io/example_sim_07

The app itself relies only upon the html documents and so does not need the packages that were used to create them. I would like to keep the R markdown documents in the repo. Is there some sort of buildignore for shinyapps that would allow specific files to be ignored when the app is deployed?


Thanks,
Homer
​

Andy Kipp

unread,
Jun 15, 2015, 9:27:36 AM6/15/15
to Homer White, shinyap...@googlegroups.com
Homer,

Are you using RStudio IDE?

-Andy

--
You received this message because you are subscribed to the Google Groups "ShinyApps Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to shinyapps-use...@googlegroups.com.
To post to this group, send email to shinyap...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/shinyapps-users/9fb5170e-2571-4eac-9c9d-7de21a059f36%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Andy Kipp

unread,
Jun 16, 2015, 10:01:33 AM6/16/15
to Homer White, shinyap...@googlegroups.com
I think you have two options here:

1) If you update to a recent version of the RStudio IDE you can use the "Publish" button to deploy an doc. I *think* this will ensure that only the selected doc is examined for dependencies.

2) Alternatively, you can update to the latest version of shinyapps package and use the deployDoc() function which will do the same.

To update shinyapps:

devtools::install_github('rstudio/shinyapps')

-Andy

On Tue, Jun 16, 2015 at 7:37 AM, Homer White <homerh...@gmail.com> wrote:

Yes.


Homer White

unread,
Jun 16, 2015, 10:24:09 AM6/16/15
to shinyap...@googlegroups.com, homerh...@gmail.com
deploy_Doc() appears to be for hosting an R Markdown document or some other single-file application.

However, I note that deployApp() has an appFiles argument.  I can use this argument, leaving out the R Markdown source files, and I should be fine.

Thanks,
Homer

Andy Kipp

unread,
Jun 16, 2015, 11:09:18 AM6/16/15
to Homer White, shinyap...@googlegroups.com
Homer,

Sorry I misunderstood, I thought you wanted to deploy a doc while ignoring the app files. Anyway, your approach sounds good, let me know if it works ;-)

-Andy

--
You received this message because you are subscribed to the Google Groups "ShinyApps Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to shinyapps-use...@googlegroups.com.
To post to this group, send email to shinyap...@googlegroups.com.

Homer White

unread,
Jun 20, 2015, 12:22:58 PM6/20/15
to shinyap...@googlegroups.com, homerh...@gmail.com
Yes, it worked.
Reply all
Reply to author
Forward
0 new messages