Commit 445d9a92 authored by Jean-Marie Lepioufle's avatar Jean-Marie Lepioufle
Browse files

typo

parent b41bdbe7
......@@ -119,7 +119,8 @@ era5 <- hello$ts(fromDateTime=fromDateTime,
cat("-- mean agregation and time difference since the beginning of the study \n")
era5 <- cbind(era5,era5[,.(data.table::IDateTime(date))])
era5[,`:=`(diff_s = as.numeric(as.POSIXct(idate,itime,tz="UTC")-as.POSIXct(fromDateTime,tz="UTC")))]
#era5[,`:=`(diff_s = as.numeric(as.POSIXct(idate,itime,tz="UTC")-as.POSIXct(fromDateTime,tz="UTC")))]
era5[,`:=`(diff_s = as.numeric(base::difftime(as.POSIXct(idate,itime,tz="UTC"), as.POSIXct("1970-01-01 00:00:00",tz="UTC"), units = "secs")))]
study <- switch(timeAggregation,
"hourly" = era5[, .(value = mean(values,na.rm=TRUE),diff_sec = max(diff_s,na.rm=TRUE)), by = list(ID = SamplingPoint, variable = variable, level = level, year = data.table::year(idate),month = data.table::month(idate), doy = data.table::yday(idate), dom = data.table::mday(idate),hour = data.table::hour(itime))],
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment