RMevents and DataRetrieval
Created by: rbcarvin
Trying to get RMevents to run on data I just pulled from DataRetieval and I am getting the error:
Error in aggregate.data.frame(as.data.frame(x), ...) : no rows to aggregate
#dataRetrieval call:
siteNumber <- "05408480"
parameterCd <- "00045" # Precipitation
startDate <- "2015-10-01"
endDate <- "2016-09-30"
precip_05408480 <- readNWISuv(siteNumber, parameterCd, startDate, endDate,tz = "America/Chicago")
precip_05408480 <- renameNWISColumns(precip_05408480)
#RMevents function:
ieHr <- 2
rainthresh <- 0.008
precip_events <- RMevents_sko(df = precip_05408480,ieHr = ieHr,rainthresh = rainthresh,rain = "Precip_Inst",time = "dateTime")
precip_event_list <- precip_events$storms2
from what I can tell, the dateTime column is coming in as POSIXct, so shouldn't need to be changed, and the Precip_Inst values look right too.