You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Probably this is not a bug but design. The documentation actually says if selection is a numeric vector, it is compares with x. However, taking column or raw index for selection is a more natural behavior.
By design it should take a numeric index too, so it's a bug. Adding the ability to select from a numeric index should be implemented. I suggest we add logical selection too.
If it takes numeric index, there will be an ambiguity whether the input to selection is an index for x or an object for which similarity will be calculated. One solution would be to restrict such objects to be a dfm.
I agree that we cannot both allow an integer index and an object supplied as a direct numeric for comparison with x. I think the original idea was to supply an object like the y in proxy::similar(). But since it's called selection, it should be a valid index for the margin specified, and this means character, integer, or logical. So for consistency, we should drop the direct supply of an object whose similarity will be computed, and make this argument behave as its name suggests.
The text was updated successfully, but these errors were encountered: