RobinHankin / disordR

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

extract all elements error message misleading #24

Closed RobinHankin closed 3 years ago

RobinHankin commented 3 years ago
> d <- disord(1:3)
> d[c(1,2,3,1,2,3)]
Error in .local(x, i, j = j, ..., drop) : 
  if using a regular index to extract, must extract all elements
>

Above, the error message is slightly misleading as I did extract all the elements. But the idiom is behaving correctly by returnin an error, as the output is not well-defined.