Rdata from dropbox to shinyapps.io
Opened this issue · 0 comments
juliapandatalover commented
Hi, I am trying to load Rdata from dropbox to shiny. I follow the code posted on Issue #66 and it works when I run the shiny app locally. However, when I try to publish the app to shinyapps.io, it gives me error messages. Here is the error messages I found in the Logs:
Warning: Error in readChar: cannot open the connection
133: knitr::knit
152: readChar
132:
151: load
127:
cannot open compressed file '/tmp/Rtmp7B6lDm/data_f1_sub.Rdata', probable reason 'No such file or directory'
Here is the code:
library(flexdashboard)
library(shiny)
library(knitr)
library(ggplot2)
library(plotly)
library(rdrop2)
token <- readRDS("token.rds")
drop_acc(dtoken = token)
drop_load_RData <- function(file, name, dest = gsub("\\", '/', tempdir(),fixed=T), dtoken = token, ...) {
localfile = paste0(dest, "/", basename(file))
drop_download(file, overwrite = TRUE, dtoken = dtoken)
load(localfile)
get(name)
}
cell_labels=drop_load_RData("data_f1_sub.Rdata","cell_labels")
Please give me some guidance. Thank you so much!