Closed rbcarvin closed 6 years ago
The same exercise does work with the "test_data_ones.1.csv" file, also in the data folder on my fork.
test_data_ones <- read.csv("M:/NonPoint Evaluation/GLRI Edge-of-field/R/Rainmaker/R_package_course/test_data_ones.1.CSV",sep = ",")
RDB3 <- RMprep(df=test_data_ones,prep.type = 3,date.type = 4,cnames.in = "rain")
RMevent_sko.list_RDB3 <- RMevents_sko(df=RDB3,rainthresh = 0.0,ieHr = 2)
RMevent_sko.0.2_RDB3 <- RMevent_sko.list_RDB3$storms2
StormSummary <- RMIntense(df=RDB3,date="pdate",rain="rain",
df.events=RMevent_sko.0.2_RDB3,sdate="StartDate",edate="EndDate",depth="rain",xmin=c(5,10,15,30,60))
@rbcarvin Turns out to be an easy fix. Because we were telling RMprop
that the logger was in central with dst, we got an error when the time switched. Instead, use the following:
RMprep(..., tz = 'Etc/GMT-6')
This is telling the function that we're using UTC minus six hours. The times get exported as the same times as the logger. I tried this with the cooperators data, and it allowed me to run RMprep
and RMevents_sko
This is related to issue #11 and the solution (set tz='Etc/GMT-6') needs to be spelled out in the vignette.
This issue has been resolved, save for the suggestion to include info about timezones in the vignette.
Rainmaker's RMIntense function is failing and I can't figure out why. "rain.test.csv" is available in the r-data file on my fork.
When I run the above lines I get:
Error in
[.data.frame
(df, , date) : undefined columns selected