Avoid exporting as_tibble.list
jennybc opened this issue · 1 comments
I have a bug report on readxl that I believe originates in the as_tibble.list()
method exported here (tidyverse/readxl#482).
Lines 83 to 97 in 9c88d62
Unfortunately, I can't reproduce the OP's issue because he did not provide his test.xlsx
file. But the spreadsheet must have some combination of missing/duplicated columns that creates a list that is an edge case for your code intended to "not accidentally hijack a real list vector".
I don't understand this package well enough to know why you have as_tibble.list()
. But I think it's not a good practice to export a method (a list method, in this case) that masks a method provided by the package that owns the generic (as_tibble()
and the tibble package, in this case).
Can you create an S3 class for whatever list-y output you need special handling for (e.g. mosaic_list
) and create an as_tibble()
method for that instead (e.g. as_tibble.mosaic_list
)?
This issue has been fixed (a big thank you to @earowang !!) and we are no longer hijacking as_tibble.list()