codebook icon indicating copy to clipboard operation
codebook copied to clipboard

Failure with dev tibble?

Open krlmlr opened this issue 2 years ago • 4 comments

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 avatar Jul 22 '21 02:07 krlmlr

@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.

krlmlr avatar Jul 22 '21 18:07 krlmlr

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.

rubenarslan avatar Jul 22 '21 18:07 rubenarslan

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

krlmlr avatar Jul 23 '21 02:07 krlmlr

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?

krlmlr avatar Sep 26 '21 18:09 krlmlr