RobinHankin / disordR

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

%in% #18

Closed RobinHankin closed 3 years ago

RobinHankin commented 3 years ago
> a <- disord(sample(1:4,30,replace=TRUE))
> a
A disord object with hash 265bf3d17dfa8c05ecd56f28db62710ba3ffd609 and elements
 [1] 1 1 1 4 1 2 3 2 1 4 1 1 1 1 4 1 1 2 2 1 4 1 3 2 3 4 4 4 4 4
(in some order)
> a[a %in% 1:2] 
Error in .local(x, i, j = j, ..., drop) : 
  if using a regular index to extract, must extract all elements

Above, I would expect the last line to return something sensible. Also the error message is outdated.