rubenarslan / codebook

Cook rmarkdown codebooks from metadata on R data frames
https://rubenarslan.github.io/codebook/
Other
142 stars 16 forks source link

Failure with dev tibble? #68

Closed krlmlr closed 1 month ago

krlmlr commented 3 years ago

When trying to release tibble to CRAN, I received the following change to worse with the codebook package that could be related to one of the changes (now using pillar::dim_desc() instead of home-grown version). Could you please take a look? Is this a problem on tibble's end?

 --- re-building ‘codebook_qualtrics.Rmd’ using rmarkdown

 Attaching package: 'dplyr'

 The following objects are masked from 'package:stats':

     filter, lag

 The following objects are masked from 'package:base':

     intersect, setdiff, setequal, union

 Quitting from lines 103-105 (codebook_qualtrics.Rmd) 
 Error: processing vignette 'codebook_qualtrics.Rmd' failed with diagnostics:
 Could not summarise item Q7. Error in `[<-.data.frame`(`*tmp*`, , j, value = c("# A tibble: 7 × 2", : replacement has 10 rows, data has 7
krlmlr commented 3 years ago

@rubenarslan: It seems that the error is in the last chunk in _codebook_item.Rmd . You can no longer rely on tibble::enframe() to produce an error if the input is a data frame. A simple fix consists of explicitly checking if the input is already a data frame.

rubenarslan commented 3 years ago

Thanks for already looking into this! This version is released on CRAN already? I'm about to go on holiday, can't manage a fix before then, so I guess there'll be some breakage for a while.

krlmlr commented 3 years ago

I'm not even sure enframe() should be supported for data frames. Let's tackle this when you're back, enjoy vacation!

krlmlr commented 3 years ago

Can you please install https://github.com/tidyverse/tibble/pull/915 and let me know if codebook still fails its checks, and if so if is a tibble or a codebook problem?

rubenarslan commented 1 month ago

Seems to be fixed.