Closed BFalquet closed 2 months ago
@BFalquet I cannot reproduce the error
@Melkiades There is also something weird happening with the dependencies today, but just from a purely formal code analysis point of view, the following code in paginate_to_mpfs
has a small issue:
(length(prov_footer(obj)) == 0 || !grepl(page_num, prov_footer(obj), perl = TRUE))
If the length of prov_footer(obj) is bigger than 1, the grepl
expression will return a logical vector bigger than 1 that will cause an issue because here the ||
expects two vectors of size 1. E.g
> FALSE || grepl("a", letters)
Error in FALSE || grepl("a", letters) :
'length = 26' in coercion to 'logical(1)'
It doesn't fail every time, because if the first part of the expression is TRUE, the second part is not evaluated but in the other cases, we have an issue.
Anyway, this makes the non-CRAN tests of one of my internal package fail.
ok I see! let me generalize the fix today
Should be fixed by #290 - bug was still occurring when prov_footer
is not empty but it's no longer an issue in my tests.
Reproducible example:
leads to
I think there is just a
any()
missing to handle the case where the prov footer is a vector of several elements.