Closed RobinHankin closed 4 months ago
Note that the corresponding disordR
operation, correctly, does not return an error:
library("disordR")
#> Loading required package: Matrix
x <- disord(c(1,1),drop=FALSE)
x
#> A disord object with hash 00daf2a67ab53b51babb26fc0ce997076fe54351 and elements
#> [1] 1 1
#> (in some order)
x + 1:2
#> A disord object with hash 00daf2a67ab53b51babb26fc0ce997076fe54351 and elements
#> [1] 2 3
#> (in some order)
The problem arises because x[x>0]
is a _named_vector.
Above we see a bug, surely
x[x>0] + 1:2
should raise a disordR error?