Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error in isRowColList since R 4.3.0 #1095

Closed
3 tasks
AntoineMichelet opened this issue Nov 9, 2023 · 1 comment
Closed
3 tasks

Error in isRowColList since R 4.3.0 #1095

AntoineMichelet opened this issue Nov 9, 2023 · 1 comment
Assignees

Comments

@AntoineMichelet
Copy link

AntoineMichelet commented Nov 9, 2023

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.

@yihui yihui self-assigned this Nov 9, 2023
@yihui yihui closed this as completed in 8f6bfd1 Nov 9, 2023
@yihui
Copy link
Member

yihui commented Nov 9, 2023

Should be fixed now. Thanks for the report! You can install the development version via

remotes::install_github('rstudio/DT')

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

No branches or pull requests

2 participants