RobinHankin / disordR

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

replacement methods too lax #28

Closed RobinHankin closed 3 years ago

RobinHankin commented 3 years ago

Look:

> a <- disord(1:10)
> a[a<5] <- c(113,116,112,119)
> a
A disord object with hash 65e11d78de79b7f584068ad856749e3748cb837c and elements
 [1] 113 116 112 119   5   6   7   8   9  10
(in some order)
> 

Above, the second line works but it should not: the RHS has an order, and the LHS does not.