Closed Fuco1 closed 5 years ago
I cannot reproduce the error. First check, are you on a recent version of padr
(v.0.4.0 or higher)?
Any dependencies that can cause this? I digged in the code and I can't find where the function get_dt_var_and_name
is defined (that's the one which generates the dt_var
value).
[17:59:54]matus@thales:~/R/x86_64-pc-linux-gnu-library/3.5/padr
> cat DESCRIPTION
Package: padr
Type: Package
Title: Quickly Get Datetime Data Ready for Analysis
Version: 0.4.1
Author: Edwin Thoen
Maintainer: Edwin Thoen <edwinthoen@gmail.com>
Description: Transforms datetime data into a format ready for analysis.
It offers two core functionalities; aggregating data to a higher level interval
(thicken) and imputing records where observations were absent (pad).
License: MIT + file LICENSE
Encoding: UTF-8
LazyData: true
Depends: R (>= 3.0.0)
Imports: Rcpp, dplyr (>= 0.6.0), lubridate, rlang
Suggests: ggplot2, testthat, knitr, rmarkdown, lazyeval, tidyr,
data.table, lintr
RoxygenNote: 6.0.1
LinkingTo: Rcpp
VignetteBuilder: knitr
URL: https://github.com/EdwinTh/padr
BugReports: https://github.com/EdwinTh/padr/issues
ByteCompile: true
NeedsCompilation: yes
Packaged: 2018-06-26 10:12:45 UTC; edwinthoen
Repository: CRAN
Date/Publication: 2018-06-26 19:23:11 UTC
Built: R 3.5.2; x86_64-pc-linux-gnu; 2019-03-02 11:37:43 UTC; unix
It was my mistake I could not reproduce, I was on the dev version. In the upcoming version the warning that the data frame is unordered will be removed from thicken
. It is the checking of the order of the datetime variable that causes the problem. This bug will be automatically resolved because of it.
You can install the dev version with devtools::install_github("EdwinTh/padr", ref = "v.0.5.0")
@EdwinTh Thanks!
I have a script which processes some dplyr tibbles. Sometimes the tibble only has one row and it seems thicken doesn't work on that:
Here's dump of the tibble