Commit 4247e6ff authored by Jean-Marie Lepioufle's avatar Jean-Marie Lepioufle
Browse files

upgrde according to timlyr

parent c16927f6
......@@ -16,7 +16,7 @@ luftlyr_df_data <- function(x,res){
if (x$dateStructObj$COL_DATE) {
# ..
} else if (!x$dateStructObj$COL_DATE){
tmp <- timelyr::checkDate(df = tmp, timeObj=x$timeObj, missingValues = NA)
tmp <- timelyr::checkDate(df = tmp, timeObj=x$timeObj, missingValues = NA,date_col="date",date_type="posixlt")
} else stop("COL_DATE in the right format")
......@@ -41,7 +41,7 @@ luftlyr_df_qa <- function(x,res){
if (x$dateStructObj$COL_DATE) {
# ..
} else if (!x$dateStructObj$COL_DATE){
tmp <- timelyr::checkDate(df = tmp, timeObj=x$timeObj, missingValues = NA)
tmp <- timelyr::checkDate(df = tmp, timeObj=x$timeObj, missingValues = NA, date_col="date",date_type="posixlt")
} else stop("COL_DATE in the right format")
......@@ -68,7 +68,7 @@ df_data <- function(x,ugly_df){
}
stations_id <- x$stationObj$station_id[i_s]
tmp <- timelyr::checkDate(df=ugly_df[indice,],timeObj = x$timeObj, missingValues=NA)[,target]
tmp <- timelyr::checkDate(df=ugly_df[indice,],timeObj = x$timeObj, missingValues=NA,date_col=c("YEAR_UTC","MONTH_UTC","DAY_UTC","HOUR_UTC"),date_type="df_yymmdd_hhmmss")[,target]
df <- tmp
if (length(x$stationObj$station_id)>1) {
......@@ -79,7 +79,7 @@ df_data <- function(x,ugly_df){
indice <- which( (ugly_df["ST_ID"] == x$stationObj$station_id[i_s]) & (ugly_df["CO_NAME"] == x$elementObj$element_id[i_e]))
}
stations_id <- c(stations_id,x$stationObj$station_id[i_s])
tmp <- timelyr::checkDate(df=ugly_df[indice,],timeObj = x$timeObj, missingValues=NA)[,target]
tmp <- timelyr::checkDate(df=ugly_df[indice,],timeObj = x$timeObj, missingValues=NA,date_col=c("YEAR_UTC","MONTH_UTC","DAY_UTC","HOUR_UTC"),date_type="df_yymmdd_hhmmss")[,target]
df <- cbind(df,tmp)
}
......
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