Commit 059b96b9 authored by Jean-Marie Lepioufle's avatar Jean-Marie Lepioufle
Browse files

dependancy to timelyr

parent 658e0f23
......@@ -12,10 +12,10 @@ Depends:
R (>= 3.2.0)
Imports:
luftkvalr,
friendlyr
timelyr
Remotes:
git::https://git.nilu.no/rdbnilu/luftkvalr.git,
git::https://git.nilu.no/rfriendlyts/friendlyr.git
git::https://git.nilu.no/rfriendlyts/timelyr.git
License: GPL-3
Encoding: UTF-8
LazyData: false
......
......@@ -14,7 +14,7 @@ luftlyr_df_data <- function(x,res){
tmp <- df_data(x=x,ugly_df=res)
} else if (!x$dateStructObj$COL_DATE){
tmp <- friendlyr::checkDate(df = df_data(x=x,ugly_df=res), timeObj=x$timeObj, missingValues = NA)
tmp <- timelyr::checkDate(df = df_data(x=x,ugly_df=res), timeObj=x$timeObj, missingValues = NA)
} else stop("COL_DATE in the right format")
......@@ -36,7 +36,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 <- x$stationObj$station_id[i_s]
tmp <- friendlyr::checkDate(df=ugly_df[indice,],timeObj = x$timeObj, missingValues=NA)[,"TE_VALUE"]
tmp <- timelyr::checkDate(df=ugly_df[indice,],timeObj = x$timeObj, missingValues=NA)[,"TE_VALUE"]
df <- tmp
if (length(x$stationObj$station_id)>2) {
......@@ -47,7 +47,7 @@ df_data <- function(x,ugly_df){
i_s <- i_s+1
}
stations_id <- c(stations_id,x$stationObj$station_id[i_s])
tmp <- friendlyr::checkDate(df=ugly_df[indice,],timeObj = x$timeObj, missingValues=NA)[,"TE_VALUE"]
tmp <- timelyr::checkDate(df=ugly_df[indice,],timeObj = x$timeObj, missingValues=NA)[,"TE_VALUE"]
df <- cbind(df,tmp)
}
......@@ -61,6 +61,6 @@ df_data <- function(x,ugly_df){
}
# flatten the multi-data.frame
return(friendlyr::flatten(output))
return(timelyr::flatten(output))
}
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