Bug with logical subsetting
str_atp <- c("mAmYmY", "nbAnsAmA", "")
atp_alph <- c("mA", "mY", "nbA", "nsA")
x <- tidysq::alphabet(tidysq::sq(str_atp, alphabet = atp_alph))
x[c(TRUE, TRUE, FALSE, FALSE)]
#> [1] "mA" "mY" NA NA
Created on 2024-11-25 with reprex v2.1.0
For reasons I don't fully understand this unfortunately breaks testthat::expect_setequal() in the dev version of testthat, but it seems like something you should fix anyway. (Actually what I don't understand is why expect_setequal() ever worked, not why it fails now).
Hi, thanks for reaching out.
It seems that this is related to the fact that when we were developing the package, we abused the behavior of set operations for simplicity. Recent R version added more logic to union and setdiff which broke some of the places where we used them explicitly and this has already made us update the package on CRAN recently. However, it seems we need to go over all the places we use set operations in detail.
We will try to do it over the next few days. I hope we will be able to upload to CRAN soon.
Great, thanks. I'll probably submit testthat to CRAN on Friday, but you'll still have a couple of weeks after that for the CRAN deadline.