我直接从网站 [这里][1] 访问 ncdf 文件到我的 RMarkdown 中。当我尝试使用以下代码中的 nc_open 函数读取文件时,我收到错误消息“传递的文件名不是字符串!” 知道如何解决这个问题吗?ps:我什至尝试使用gzcon函数解压缩文件,但是当我尝试读取数据时结果是一样的。谢谢你的帮助!神美
library(httr)
library(ncdf4)
nc<-GET("https://crudata.uea.ac.uk/cru/data/hrg/cru_ts_4.05/cruts.2103051243.v4.05/pre/cru_ts4.05.2011.2020.pre.dat.nc.gz")
cru_nc<-nc_open(nc)