title: R Shiny Error object not found in server.R
body: <p>I have a Shiny app that runs fine locally. However, when I deploy it on shinyapps.io I encounter the following error:</p>
  
  <blockquote>
    <p>Error: object 'actuarialtable' not found. </p>
  </blockquote>
  
  <p>where actuarialtable is an rds object I am trying to load in my server.R file. I have files "ui.r", "server.R", and "helpers.R" in my app folder with a "data" subfolder containing files "actuarialtable.rds" and "SMData.rds"</p>
  
  <p>My server.R file is as follows:</p>
  
  <pre><code>source("helpers.R")
  actuarialtable &lt;- readRDS("data/actuarialtable.rds")
  SMData &lt;- readRDS("data/SMData.rds")
  
  shinyServer(function(input, output) {
    data &lt;- reactive({
      RunSim(
        currentAge = input$currentAge,
        retireAge = input$retireAge,
        numsamples = input$numsamples,
        initValue = input$initValue,
        stockpct = input$stockpct / 100,
        moncont = input$moncont,
        maxWd = input$wdRange[2],
        minWd = input$wdRange[1],
        sex = input$sex,
        partnerAge = input$partnerAge,
        partnerSex = input$partnerSex
      )
    })
  
  &lt;Some other code plotting output of RunSim()&gt; 
  
  })
  </code></pre>
  
  <p>It seems that for some reason, my "actuarialtable.rds" file is not being loaded, but I have no idea why. My working directory is the directory containing my app. Using Windows, if that matters.</p>