as.data.frame or as_tibble broken with R 4.3.x, using && with expression of length greater than 1
Closed this issue · 2 comments
ellisp commented
This query works fine with R 4.2.3:
library(rsdmx)
library(tidyverse)
vaccination <- readSDMX(providerId = "PDH",
resource = "data",
flowRef = "DF_COVID_VACCINATION") |>
as_tibble()
But in 4.3.0 or higher it returns an error
Error in !is.na(obsAttrs.df) && ifelse(is.na(any(obsAttrs.df == "NULL")), :
'length = 2' in coercion to 'logical(1)'
the same error also comes if you use as.data.frame
instead of as_tibble
This obviously relatest to the breaking change in R 4.3.0:
CHANGES IN R 4.3.0:
SIGNIFICANT USER-VISIBLE CHANGES:
* 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.
eblondel commented
It should have been fixed with #192 already, can you reinstall from github
and check?
Le lun. 14 août 2023 à 08:34, Peter Ellis ***@***.***> a
écrit :
… This query works fine with R 4.2.3:
library(rsdmx)
library(tidyverse)
vaccination <- readSDMX(providerId = "PDH",
resource = "data",
flowRef = "DF_COVID_VACCINATION") |>
as_tibble()
But in 4.3.0 or higher it returns an error
Error in !is.na(obsAttrs.df) && ifelse(is.na(any(obsAttrs.df == "NULL")), :
'length = 2' in coercion to 'logical(1)'
the same error also comes if you use as.data.frame instead of as_tibble
This obviously relatest to the breaking change in R 4.3.0:
CHANGES IN R 4.3.0:
SIGNIFICANT USER-VISIBLE CHANGES:
* 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.
—
Reply to this email directly, view it on GitHub
<#193>, or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAKDK3BD726SEVXOAYUJLD3XVHBJFANCNFSM6AAAAAA3PHV6ZA>
.
You are receiving this because you are subscribed to this thread.Message
ID: ***@***.***>
ellisp commented
thanks yes it works with the GitHub version