RobinHankin / disordR

https://robinhankin.github.io/disordR/
1 stars 0 forks source link

`a[] <- x` changes the hash #49

Closed RobinHankin closed 1 year ago

RobinHankin commented 1 year ago
a <- disord(c(1,1,1),drop=FALSE)
a
A disord object with hash d5c3a970db727f70b815b55ac2f42de4129325fa and elements
[1] 1 1 1
(in some order)
a[] <- 1:3
a
A disord object with hash fe50fd4ad46d4410a866d82ffcc8686c763dc2f8 and elements
[1] 1 2 3
(in some order)

Above, a[] <- 1:3 should work as it does not break disord discipline, but note that it changes the hash. I do not think this is correct, I think the hash of a should not change under these circumstances.