Skip to content
Snippets Groups Projects
Commit cad6c523 authored by Jean-Marie Lepioufle's avatar Jean-Marie Lepioufle
Browse files

typo

parent 85273e13
No related branches found
No related tags found
No related merge requests found
......@@ -16,6 +16,7 @@ Imports:
stats,
dplyr,
timemanip,
tidyselect,
tidyr
Remotes: git::https://git.nilu.no/rspacetimemanip/timemanip.git
License: GPL-3
......
# Generated by roxygen2: do not edit by hand
S3method(print,tbl_friendlyts)
export(as_tbl_friendlyts)
export(bind_cols_fts)
export(check_date)
......
......@@ -122,8 +122,6 @@ as_tbl_friendlyts_ <- function(df,date_col=NULL,precision,date_type=c("friendlyt
}
}
res <- as.data.frame(res)
# time related colums as integer and sort
if (precision == "yearly") {
res$WDAY <- as.integer(as.character(res$WDAY))
......
......@@ -15,7 +15,7 @@
#' }
ts_spread <- function(df,col_date,col_key,col_target,precision="second",tzone="UTC",date_type=c("friendlyts","df_yymmdd_hhmmss","posixlt","%Y-%m-%d %H:%M:%S","%Y-%m-%dT%H:%M:%OSZ","%Y/%m/%d %H:%M:%S")){
res <- df %>% select(c(col_date,col_key,col_target)) %>% tidyr::unite("temp", col_key) %>% tidyr::spread("temp", col_target[1])
res <- df %>% select(c(tidyselect::all_of(col_date),tidyselect::all_of(col_key),tidyselect::all_of(col_target))) %>% tidyr::unite("temp", tidyselect::all_of(col_key)) %>% tidyr::spread("temp", col_target[1])
res <- friendlyts::friendlyts(df=res,date_col=col_date,date_type=date_type,precision=precision,tzone=tzone)
return(res)
......
#' @importFrom dplyr %>% bind_cols select select_ filter filter_ mutate mutate_ transmute transmute_ group_by group_by_ arrange
NULL
#' @export
print.tbl_friendlyts <- function(x,...){
utils::head(x,...)
}
#' file_friendlyts
#' file_friendlyts
......
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