> x <- disord(c(4,2,1,2))
> x
A disord object with hash 6c08f4289697119188dfd166d674114d8b15a8fe and elements
[1] 4 2 1 2
(in some order)
> for(i in x){print(i)}
[1] 4
[1] 2
[1] 1
[1] 2
>
See that the for() loop imposes an ordering on x, as it identifies "4" as the first element, "2" as the second, and so on. This is equivalent to using elements(). I don't think this is a bug as such but it should be documented.
Look:
See that the
for()
loop imposes an ordering onx
, as it identifies "4" as the first element, "2" as the second, and so on. This is equivalent to usingelements()
. I don't think this is a bug as such but it should be documented.