I am still having trouble getting a large file (.rds) from google drive into R. The purpose is to pull the rds file from drive, for use in an Rshiny.app.
If I use
library(googledrive)
temp <- tempfile(fileext = ".rds")
dl <- drive_download(
as_id("XXXXXXXXX"), path = temp, overwrite = TRUE)
myObj<-readRDS(file = dl$local_path)
It works fine, because it downloads the file by ID into the tempdir. But then it requires token auth for tidyverse (almost) every time.
There are other options using download.file()
as in R How to read a file from google drive using R, however I am running into the issue that the share/download link leads to a prompt, notifying users of virus scan.
I have tried direct download links, changing href, shareable link, with no success. Any ideas how I can work around this, using the share/download link and download.file()
?