Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign up[bug] %in% statement fails if the category contains both lowercase and uppercase letters #2881
Comments
|
@MarkusBonsch care to take a look? seems odd |
|
Using
I suspect this should be a message at least, possibly a warning. |
|
@ddong63 Using @HughParsonage it will be soon hopefully, there is #2734 pending. |
|
Very very strange. I will investigate and fix ASAP. Thanks for the report. |
|
@jangorecki was right. When both columns have the same data type, either character or factor, it works fine. |
|
I have created a PR that (hopefully) fixes the issue. It is a regression that was introduced by one of my own PRs. |
In version
1.11.2, when using%in%and&statements together,%in%does not respect factor starting with a capitalized letter. Here is an example:[Issue]
After capitalizing the first letter in 'virginica',
%in%statement cannot return to both groups when using a&statement, see below:[Examples]
Tried with few examples below and they work fine.
If I subset on groups containing lowercases only, both groups were found.
Or, if I add parenthesis to the either statement, both groups were found.
I tried this statement in
subsetfunction and it works.This feature works in an older version data.table package (use version
1.10.4-3as an example here):[session info]