title: Loading Data from Dropbox directly in Shiny App
body: <p>This is a continuation of my previous question.
  <a href="https://stackoverflow.com/questions/41573017/compress-data-in-r">Compress Data in R</a></p>
  
  <p>I thought to store data in dropbox and access it remotely.I used rdrop2 package of R to access dropbox and get the data from dropbox directly.</p>
  
  <p>I know the connection to dropbox is working,I have been able to create folders (Single_Cell_RNAseq_data) and move files on dropbox from R Studio.</p>
  
  <p>My app is running fine when I run the app locally in R Studio ,the data gets uploaded from the dropbox and can be visualized.</p>
  
  <p>I saved the token locally.</p>
  
  <pre><code>token &lt;- drop_auth()
  saveRDS(token, "droptoken.rds")
  </code></pre>
  
  <h2>in the global.r Script</h2>
  
  <pre><code>token &lt;- readRDS("droptoken.rds")
  geneExpressionMatrix_yf1 &lt;-    drop_read_csv("Single_Cell_RNAseq_data/geneExpressionMatrix_yf1.csv",dtoken=token)
  </code></pre>
  
  <p>But while deploying on shinyapps.io, its throwing me this error.</p>
  
  <p>An error has occurred
  Unable to connect to worker after 60.00 seconds; startup took too long.</p>
  
  <p>I found another post and tried to read the tokens and the files in server.r script, but still not able to read the files in the App.
  <a href="https://stackoverflow.com/questions/38197751/loading-image-file-from-dropbox-into-r-shiny-app">Loading image file from Dropbox into R Shiny app</a></p>
  
  <p>Here is the <strong>beginning</strong> of my server.r script</p>
  
  <pre><code>token &lt;- readRDS("droptoken.rds")
  
  drop_acc(dtoken = token)
  
  shinyServer(function(input, output) {
  
  
  
   observeEvent(input$text,{
  
  
  
  
  
  
  
  output$distPlot &lt;- renderPlot({
  
    geneExpressionMatrix_yf1 &lt;- drop_read_csv("Single_Cell_RNAseq_data/geneExpressionMatrix_yf1.csv",dtoken=token)
    tsneCoordinates_yf1 &lt;- drop_read_csv("Single_Cell_RNAseq_data/tsneCoordinates_yf1.csv",dtoken=token)
  </code></pre>
  
  <p>Any suggestions?</p>
  
  <p>Thanks,
  Ron</p>