我以前使用过包中的ROSETTA()
功能,soilDB
直到上个月它都运行良好。现在每次尝试使用它时,都会出现以下错误:
Error in curl::curl_fetch_memory(url, handle = handle) : Timeout was reached: [www.handbook60.org] Connection timed out after 10010 milliseconds
例如,我从介绍性文档http://ncss-tech.github.io/AQP/soilDB/ROSETTA-API.html中运行了相同的代码
# required libraries
library(soilDB)
library(httr)
library(jsonlite)
# SQL to be submitted to SDA
q <- "SELECT
-- contextual data
compname, comppct_r,
-- horizon morphology
hzname, hzdept_r, hzdepb_r,
-- parameters used by ROSETTA, may contain NULL
sandtotal_r, silttotal_r, claytotal_r, dbthirdbar_r,
wthirdbar_r/100 AS wthirdbar_decimal, wfifteenbar_r/100 AS wfifteenbar_decimal
-- tables of interest
FROM
mapunit AS mu
-- implicit filtering
INNER JOIN component AS co ON mu.mukey = co.mukey
INNER JOIN chorizon AS ch ON co.cokey = ch.cokey
-- single map unit
WHERE mu.mukey = '373596'
-- order for visual inspection
ORDER BY co.cokey, ch.hzdept_r ASC;"
# submit query to SDA
x <- SDA_query(q)
# attempting to use all possible soil properties
vars <- c('sandtotal_r', 'silttotal_r', 'claytotal_r', 'dbthirdbar_r', 'wthirdbar_decimal', 'wfifteenbar_decimal')
# call ROSETTA API
r <- ROSETTA(x, vars = vars)
我已经尝试从这里安装软件包的最新版本:
remotes::install_github("ncss-tech/soilDB", dependencies = FALSE, upgrade_dependencies=FALSE)
我正在使用 R 版本 4.1.0。
有没有人遇到过同样的问题并想出了解决方案?
非常感谢您的帮助!