From dd123f0636e56d9f4bcf1dbb9e1561b781e45eb2 Mon Sep 17 00:00:00 2001 From: Andrew Gene Brown Date: Wed, 18 Sep 2024 16:18:36 -0700 Subject: [PATCH] fetchSCAN: return all above-ground sensors --- R/fetchSCAN.R | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/R/fetchSCAN.R b/R/fetchSCAN.R index 8810c8e6..9090cba5 100644 --- a/R/fetchSCAN.R +++ b/R/fetchSCAN.R @@ -235,14 +235,11 @@ fetchSCAN <- function(site.code = NULL, year = NULL, report = 'SCAN', timeseries return(NULL) } - ## https://github.com/ncss-tech/soilDB/issues/14 - ## there may be multiple above-ground sensors (takes the first) + ## there may be multiple above-ground sensors if (length(d.cols) > 1 && code %in% c('TAVG', 'TMIN', 'TMAX', 'PRCP', 'PREC', 'SNWD', 'WTEQ', 'WDIRV', 'WSPDV', 'LRADT')) { message(paste0('multiple sensors per site [site ', d$Site[1], '] ', paste0(names(d)[d.cols], collapse = ','))) - # use only the first sensor - d.cols <- d.cols[1] } # coerce all values to double (avoids data.table warnings)