Skip to content
Snippets Groups Projects
Commit 51aa5b1f authored by jml's avatar jml
Browse files

typo

parent 9878ab7b
No related branches found
No related tags found
No related merge requests found
Package: friendlyts
Type: Package
Version: 0.2.7
Version: 0.2.8
Authors@R: c(person("Jean-Marie", "Lepioufle", , "jml@nilu.no", role=c("aut","cre")),
person("NILU",role="cph"))
Title: friendlyts
......
......@@ -100,7 +100,7 @@ as_tbl_friendlyts_ <- function(df,date_col=NULL,precision,date_type=c("friendlyt
print(paste0("Because made only of NAs, the following columns are taken away: ",paste0(names(df)[indice],collapse=",")))
res <- res[,-indice]
non_date_col <- setdiff(names(df), names(df)[date_col])
non_date_col <- setdiff(names(res), names(res)[date_col])
if (length(non_date_col)==0) {
value <- rep(NA,length(as.POSIXlt(dateTS)))
non_date_col <- "empty"
......@@ -115,13 +115,13 @@ as_tbl_friendlyts_ <- function(df,date_col=NULL,precision,date_type=c("friendlyt
"second" = timemanip::YYYYmmddHHMMSS_m(as.POSIXlt(dateTS)),
stop("precision not recognized")),
value = value)
}
colname_date <- get_name_date_col(precision)
colnames(res) <- c(colname_date,non_date_col)
}
}
}
res <- tibble::as_tibble(res)
# time related colums as integer and sort
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment