Error in isRowColList since R 4.3.0
AntoineMichelet opened this issue · 1 comments
Hi,
Since R 4.3.0 :
"Calling && or || with LHS or (if evaluated) RHS of length greater than one is now always an error, with a report of the form
'length = 4' in coercion to 'logical(1)'
Environment variable R_CHECK_LENGTH_1_LOGIC2 no longer has any effect."
Function isRowColList in datatables.R is implemented like this:
isRowColList = function(x) is.list(x) && names(x) %in% c('rows', 'cols')
And then fails when it is called with error : length = 2' in coercion to 'logical(1)'
Suggested fix:
isRowColList = function(x) is.list(x) && all(names(x) %in% c('rows', 'cols'))
Rgds,
By filing an issue to this repo, I promise that
- I have fully read the issue guide at https://yihui.org/issue/.
- I have provided the necessary information about my issue.
- If I'm asking a question, I have already asked it on Stack Overflow or RStudio Community, waited for at least 24 hours, and included a link to my question there.
- If I'm filing a bug report, I have included a minimal, self-contained, and reproducible example, and have also included
xfun::session_info('DT')
. I have upgraded all my packages to their latest versions (e.g., R, RStudio, and R packages), and also tried the development version:remotes::install_github('rstudio/DT')
. - If I have posted the same issue elsewhere, I have also mentioned it in this issue.
- I have learned the Github Markdown syntax, and formatted my issue correctly.
I understand that my issue may be closed if I don't fulfill my promises.
Should be fixed now. Thanks for the report! You can install the development version via
remotes::install_github('rstudio/DT')