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

Broken R recipes from v2.11.0 due to use of R v4.3.0 #3674

Closed
ehogan opened this issue Jun 21, 2024 · 0 comments · Fixed by #3689
Closed

Broken R recipes from v2.11.0 due to use of R v4.3.0 #3674

ehogan opened this issue Jun 21, 2024 · 0 comments · Fixed by #3689
Assignees
Labels
Milestone

Comments

@ehogan
Copy link
Contributor

ehogan commented Jun 21, 2024

Describe the bug
The following R recipes failed in the recent ESMValCore v2.11.0rc1 testing:

  • recipe_combined_indices.yml
    Error in (!is.null(d$longname)) && (nchar(d$longname) > 0) : 
      'length = 2' in coercion to 'logical(1)'
    Calls: nc_create -> ncvar_add -> ncdim_create
    
  • recipe_extreme_events.yml
    Error in (!is.character(filename)) || (nchar(filename) < 1) :
      'length = 2' in coercion to 'logical(1)'
    Calls: gleckler_main -> gleckler_array -> nc_open
    
  • recipe_miles_block.yml
  • recipe_miles_eof.yml
  • recipe_miles_regimes.yml
    Error in (models_dataset == reference_dataset) && (models_exp == reference_exp) :
      'length = 2' in coercion to 'logical(1)'
    Calls: which
    

According to https://cran.r-project.org/doc/manuals/r-release/NEWS.html, v4.3.0 introduced the following change:

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)'

Possible solutions:

@ehogan ehogan self-assigned this Jun 21, 2024
@ehogan ehogan changed the title Use all in comparison statements in R recipes Broken R recipes from v2.11.0 due to use of R v4.3.0 Jun 26, 2024
ehogan added a commit that referenced this issue Jun 27, 2024
@ehogan ehogan mentioned this issue Jun 27, 2024
6 tasks
@ehogan ehogan added this to the v2.11.0 milestone Jun 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants