R скачать файл netcdf из Google Dirve - PullRequest
0 голосов
/ 18 февраля 2019

Я пытаюсь загрузить файлы с Google Drive, я пробовал разные типы файлов, но не могу скачать файлы netcdf (~ 142 МБ каждый).

https://drive.google.com/drive/folders/1rKRqEoo24sKcRRy5o67Su6SjNV1CV49d

download.file (dataURL1, destfile = dataDest1, method = "auto", mode = "wb"), пробующий URL 'https://drive.google.com/uc?export=download&id=1SHnmzV4L1Lqjj9XMdIFQ-nQHOGRpnPhB' Тип содержимого' text / html;charset = utf-8 'длина неизвестна скачано 3294 байта

кроме файлов netcdf, другие типы файлов работают нормально (txt, csv, excel)

# URL's obtained from Google Shared Directory
ShareDataURL1 = "https://drive.google.com/open?id=1SHnmzV4L1Lqjj9XMdIFQ-nQHOGRpnPhB" 
ShareDataURL2 = "https://drive.google.com/open?id=1_EtVr2nngh6V67Y8_l_phWqvpFqTlqfb"  #example of a txt file

dataURL1 <- gsub("open\\?", "uc\\?export=download\\&", ShareDataURL1 )
dataURL2 <- gsub("open\\?", "uc\\?export=download\\&", ShareDataURL2 )  

dataDest1 = file.path("C:/Users/jhuang/test1.ncf" )
dataDest2 = file.path("C:/Users/jhuang/test2.txt" )

download.file(dataURL1, destfile = dataDest1, method = "auto", mode = "wb")
download.file(dataURL2, destfile = dataDest2, method = "auto", mode = "wb")
Добро пожаловать на сайт PullRequest, где вы можете задавать вопросы и получать ответы от других членов сообщества.
...