ropensci / daiquiri

Data quality reporting for temporal datasets.
https://ropensci.github.io/daiquiri/
GNU General Public License v3.0
35 stars 2 forks source link

Cannot create report with `daiquiri::daiquiri_report()` #10

Closed fkohrt closed 2 years ago

fkohrt commented 2 years ago

Attempting to create a report via daiquiri::daiquiri_report() doesn't work. The following example only works after uncommenting library(daiquiri) and replacing daiquiri::daiquiri_report(…) by daiquiri_report(…)

#library(daiquiri)
daiquiri::daiquiri_report(
    data.frame(date = paste0("2022-11-", formatC(1:26, width = 2, format = "d", flag = "0")), val = 1:26),
    field_types = daiquiri::field_types(
        date = daiquiri::ft_timepoint(includes_time = FALSE),
        val = daiquiri::ft_numeric()
    ),
    save_filename = "daiquiri"
)

Otherwise it gives the following error:

Error in get(fun, mode = "function", envir = envir) : 
  first argument has length > 1

sessionInfo() ``` R version 4.2.1 (2022-06-23) Platform: x86_64-pc-linux-gnu (64-bit) Running under: Ubuntu 18.04.6 LTS Matrix products: default BLAS: /usr/lib/x86_64-linux-gnu/openblas/libblas.so.3 LAPACK: /usr/lib/x86_64-linux-gnu/libopenblasp-r0.2.20.so locale: [1] LC_CTYPE=en_US.UTF-8 [2] LC_NUMERIC=C [3] LC_TIME=en_US.UTF-8 [4] LC_COLLATE=en_US.UTF-8 [5] LC_MONETARY=en_US.UTF-8 [6] LC_MESSAGES=en_US.UTF-8 [7] LC_PAPER=en_US.UTF-8 [8] LC_NAME=C [9] LC_ADDRESS=C [10] LC_TELEPHONE=C [11] LC_MEASUREMENT=en_US.UTF-8 [12] LC_IDENTIFICATION=C attached base packages: [1] stats graphics grDevices utils datasets [6] methods base other attached packages: [1] daiquiri_1.0.2.9000 dplyr_1.0.10 loaded via a namespace (and not attached): [1] tidyselect_1.2.0 xfun_0.35 [3] purrr_0.3.5 generics_0.1.3 [5] colorspace_2.0-3 vctrs_0.5.1 [7] htmltools_0.5.3 yaml_2.3.6 [9] utf8_1.2.2 rlang_1.0.6 [11] pillar_1.8.1 DBI_1.1.3 [13] glue_1.6.2 withr_2.5.0 [15] bit64_4.0.5 lifecycle_1.0.3 [17] munsell_0.5.0 gtable_0.3.1 [19] evaluate_0.18 knitr_1.41 [21] tzdb_0.3.0 fastmap_1.1.0 [23] fansi_1.0.3 readr_2.1.3 [25] scales_1.2.1 vroom_1.6.0 [27] bit_4.0.5 hms_1.1.2 [29] ggplot2_3.4.0 digest_0.6.30 [31] grid_4.2.1 cli_3.4.1 [33] tools_4.2.1 magrittr_2.0.3 [35] tibble_3.1.8 crayon_1.5.2 [37] pkgconfig_2.0.3 ellipsis_0.3.2 [39] data.table_1.14.6 assertthat_0.2.1 [41] rmarkdown_2.18 rstudioapi_0.14 [43] R6_2.5.1 compiler_4.2.1 ```
fkohrt commented 2 years ago

If I do

remotes::install_github(
  repo = "ropensci/daiquiri",
  ref = "e8b1213"
)

I get the same error as before.

phuongquan commented 2 years ago

I've just tried the above code now (in a fresh project) and don't get the error. Did your installation from github definitely complete successfully?

fkohrt commented 2 years ago

Sorry for the noise, you are right. Not sure why it did not work before.