title: Package not found when deploying to shinyapp.io
body: <p>I've a relatively simple shiny app that plots some data in different ways that runs fine locally but I am trying to deploy to shinyapps.io following the instructions <a href="http://shiny.rstudio.com/articles/shinyapps.html" rel="nofollow" title="here">here</a> and have hit some errors that I've no idea how to resolve (or where to start looking).    I authenticate without any problems but when I go to deploy it I get the following error message...</p>
  
  <pre><code>&gt; shinyapps::deployApp('~/Dropbox/R/nmisc/inst/shiny/cams/')
  Preparing to deploy application...Update application currently deployed at
  https://slackline.shinyapps.io/cams/ ? [Y/n] y
  DONE
  Uploading bundle for application:81835...Error in findLocalRepoForPkg(pkg,
  repos, fatal = fatal):No package 'XML' found in local repositories specified
  </code></pre>
  
  <p>Initially I had not explicitly loaded the <code>XML</code> library (and guessed it might be being pulled in as a dependency by something else).  I have it installed on my system anyway so added it to the libraries that were loaded by <code>ui.R</code> and <code>server.R</code> but still get the same error.</p>
  
  <p>I'm stumped and can't work out whats going on, but is it a case that XML is not available on shinyapps.io?  That would seem a bit strange.</p>
  
  <p>The <code>traceback()</code> in case it is useful/informative...</p>
  
  <pre><code>&gt; traceback()
  18:stop("No package '", pkg, "' found in local repositories specified")
  17:findLocalRepoForPkg(pkg, repos, fatal = fatal)
  16:getPackageRecordsLocalReposImpl(pkgName, repos, fatal = fatal)
  15:FUN(X[[i]], ...)
  14:lapply(pkgNames, function(pkgName) {
    getPackageRecordsLocalReposImpl(pkgName, repos, fatal = fatal)
  })
  13:getPackageRecordsLocalRepos(pkgNames, local.repos, fatal = !fallback.ok)
  12:getPackageRecords(
    inferredPkgsNotInLib, project = project, available = available,
    check.lockfile = TRUE, fallback.ok = fallback.ok
  )
  11:packrat::.snapshotImpl(project = bundleDir, snapshot.sources = FALSE,
                            verbose = FALSE)
  10:withCallingHandlers(
    expr, message = function(c)
      invokeRestart("muffleMessage")
  )
  9:suppressMessages(packrat::.snapshotImpl(
    project = bundleDir,
    snapshot.sources = FALSE, verbose = FALSE
  ))
  8:performPackratSnapshot(bundleDir)
  7:addPackratSnapshot(appDir, implicit_dependencies)
  6:snapshotDependencies(appDir, inferDependencies(appMode, hasParameters))
  5:createAppManifest(
    bundleDir, appMode, contentCategory, hasParameters,
    appPrimaryDoc, assetTypeName, users
  )
  4:bundleApp(target$appName, appDir, appFiles, appPrimaryDoc, assetTypeName,
              contentCategory)
  3:force(code)
  2:withStatus(paste0("Uploading bundle for ", assetTypeName, ": ",
                      application$id), {bundlePath &lt;-bundleApp(target$appName,
          appDir, appFiles, appPrimaryDoc, assetTypeName, contentCategory)
          bundle &lt;- client$uploadApplication(application$id, bundlePath)})
  1:shinyapps::deployApp("~/Dropbox/R/nmisc/inst/shiny/cams/") 
  </code></pre>
  
  <p>And my <code>ui.R</code> and <code>server.R</code> follow (<code>nmisc</code> is a personal package that contains <code>cams.df</code> data frame which is being plotted).</p>
  
  <p><strong>ui.R</strong></p>
  
  <pre><code>library(dplyr)
  library(ggplot2)
  library(nmisc)
  library(shiny)
  library(magrittr)
  library(RColorBrewer)
  library(XML)
  shinyUI(fluidPage(
    titlePanel("Cam Comparison"),
    sidebarPanel(
      width = 4,
      p(
        "Welcome, this website provides comparisons of different climbing cams.
        Its a work in progress, if you have feedback, comments or ideas please
        email the",
        HTML(
          '&lt;a href="mailto:sheffieldboulder.uk@gmail.com?subject=\'Cam site
          suggestions\'"&gt;author&lt;/a&gt;'
        ),"."
      )
  ),
  sidebarPanel(
    width = 4,
    selectInput(
      inputId  = 'to.compare',
      label    = 'Choose cams to compare :',
      choices  = c(unique(cams.df$manufacturer.model)),
      ## selected = 'All',
      multiple = TRUE
    )
  ),
  sidebarPanel(
    width = 4,
    selectInput(
      inputId  = 'free.x.axis',
      label    = 'Free x-axis :',
      choices  = c('Yes', 'No'),
      selected = 'No',
      multiple = FALSE
    )
  ),
  mainPanel(width = 12,
            column(
              12,
              tabsetPanel(
                tabPanel("Range by Cam",
                         fluidRow(
                           plotOutput("all.manufacturer",
                                      width  = 'auto',
                                      height = '1000px')
                         )),
                tabPanel("Range by Model",
                         fluidRow(
                           plotOutput("model.range",
                                      width  = 'auto',
                                      height = '1000px')
                         )),
                tabPanel("Range v Strength",
                         fluidRow(
                           plotOutput("range.strength",
                                      width  = 'auto',
                                      height = '1000px')
                         )),
                tabPanel("Range v Weight",
                         fluidRow(
                           plotOutput("range.weight",
                                      width  = 'auto',
                                      height = '1000px')
                         )),
                tabPanel("ToDo",
                         fluidRow(
                           shiny::p(
                             "Here are a list of some of the things I've not
                             done, would like to, or that have been suggested..."
                           ),
                           shiny::HTML(
                             "&lt;ul&gt;&lt;li&gt; Align similar size cams in the same
  plot rather than faceted. &lt;li&gt; Colour code cams to manufacturers colours.
  &lt;li&gt; Mix and match individual cams from a manufacturers range.&lt;li&gt;
  Select an individual cam and show all similar cams across manufacturers
  (possibly restricted to those of interest).
                             &lt;/ul&gt;"
                           )
                           ))
                           )
            ))
            ))
  </code></pre>
  
  <p><strong>server.R</strong></p>
  
  <pre><code>library(dplyr)
  library(ggplot2)
  library(nmisc)
  library(shiny)
  library(magrittr)
  library(RColorBrewer)
  library(XML)
  
  shinyServer(function(input, output) {
    # Subset the data
    #
    # See Lesson 5 and 6
    #
    # http://shiny.rstudio.com/tutorial/lesson5/
    # http://shiny.rstudio.com/tutorial/lesson6/
    # https://stackoverflow.com/questions/32148144/condition-filter-in-dplyr-
    # based-on-shiny-input
  
    dataInput &lt;- reactive({
      if (is.null(input$to.compare)) {
        cams.df
      }
      else{
        filter(cams.df,
               manufacturer.model %in% input$to.compare)
      }
    })
    ## Set scales based on responses
    scales &lt;- reactive({
      if (input$free.x.axis == "Yes") {
        'free_x'
      }
      else{
        'free_y'
      }
    })
    ## By Manufacturer
    output$all.manufacturer &lt;- renderPlot({
      cam.plot &lt;- cams(
        df          = dataInput(),
        smooth      = 'loess',
        free.scales = scales(),
        wrap.col    = 6,
        text.size   = 16
      )
      cam.plot$all.manufacturer
    })
    ## By Model Range
    output$model.range &lt;- renderPlot({
      cam.plot &lt;- cams(
        df          = dataInput(),
        smooth      = 'loess',
        free.scales = scales(),
        wrap.col    = 6,
        text.size   = 16
      )
      cam.plot$manufacturer.model
    })
    ## Range v Strength
    output$range.strength &lt;- renderPlot({
      cam.plot &lt;- cams(
        df              = dataInput(),
        smooth          = 'loess',
        free.scales     = scales(),
        wrap.col        = 6,
        text.size       = 16,
        exclude.outlier = TRUE
      )
      cam.plot$range.strength
    })
    ## Range v Weight
    output$range.weight &lt;- renderPlot({
      cam.plot &lt;- cams(
        df          = dataInput(),
        smooth      = 'loess',
        free.scales = scales(),
        wrap.col    = 6,
        text.size   = 16
      )
      cam.plot$range.weight
    })
  })
  </code></pre>