作者dreler1 (....)
看板R_Language
标题[问题] 使用R 下载 netcdf 档案 google drive
时间Mon Feb 18 23:52:13 2019
[问题类型]:
程式谘询(我想用R 做某件事情,但是我不知道要怎麽用R 写出来)
[软体熟悉度]:
开发者(有撰写R 的套件经验)
[问题叙述]:
我想从google drive 下载 netcdf 的档案
https://drive.google.com/drive/folders/1rKRqEoo24sKcRRy5o67Su6SjNV1CV49d
但是会出现
Content type 'text/html; charset=utf-8' length unknown
downloaded 3294 bytes
档案没有正常下载
我试过 其他档案都正常 (txt/csv)
[程式范例]:
[环境叙述]:
> sessionInfo()
R version 3.4.3 (2017-11-30)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 7 x64 (build 7601) Service Pack 1
[关键字]:
--
※ 发信站: 批踢踢实业坊(ptt.cc), 来自: 149.168.204.10
※ 文章网址: https://webptt.com/cn.aspx?n=bbs/R_Language/M.1550505138.A.B17.html
2F:→ celestialgod: linux测试正常 02/19 14:08
3F:→ celestialgod: Method换一个试试看 02/19 14:47
4F:→ andrew43: win10 R 3.5.2 64bit 也都正常 02/19 16:57
5F:→ dreler1: 我发现应是挡在 google drive download anyway 这边 02/20 00:38
6F:→ dreler1: 请问你们下下来大小是142MB吗? 02/20 00:40
8F:→ dreler1: href="/uc?export=download&confirm 拿这一整串 还是不行 02/20 00:41
9F:→ dreler1: 换了method 还是不行 最後用其他方法把档案转到local做了 02/20 00:42
10F:→ andrew43: 没留意档案大小。看来celestialgod和我都只取到3306 B 02/20 10:16
11F:推 Wush978: 用googledrive套件呢? 02/21 00:29
12F:→ dreler1: googledrive可以下 但是这样没办法下别人分享的东西 02/22 04:48
13F:推 Wush978: 会吗? 不能下载别人分享的东西,是不是权限设定出错呢? 02/22 23:14
这个地方我不太确定我有没有理解错
因为之前都没用googledrive
大概看了document 自己弄得
library(googledrive)
drive_find(n_max = 50)
会跟我要google API 我当然只有我自己的API
所以我不太确定要怎麽下载别人的东西
里面有提到
You can expect to be sent to your browser here, to authenticate yourself and
authorize the googledrive package to deal on your behalf with Google Drive.
drive_download("538-star-wars-survey")
我现在是用这样下载 可以完整下载
因为数据是 某个政府机构辖下的google drive
还是googledrive 可以用 id下载 我没看到这个function
谢谢啦
※ 编辑: dreler1 (149.168.204.10), 02/22/2019 23:58:08
※ 编辑: dreler1 (149.168.204.10), 03/25/2019 21:08:56