Closed lorenzwalthert closed 8 years ago
Yes I agree. Was trying to keep some consistency with cut.default but it is definitely counter-intuitive for cut.integer so should be changed.
On Sun, 4 Sep 2016, 19:57 lorwal, notifications@github.com wrote:
Problem
Depending on how breaks are specified, lowest values are included or not.
- cut(sample(10), breaks = 2) gives the levels 1-5 and 6-10 (because the default is overwritten internally on line 78, while
- cut(sample(10), breaks = c(1, 5, 10)gives the levels 2-5 and 6-10.
Suggested solution
Probably due to the default in cut.default, you wanted to keep include.lowest = FALSE. I think it is a counter intuitive default, so let's do away with it and change it to TRUE and hence remove line 78.
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/jonmcalder/refactor/issues/1, or mute the thread https://github.com/notifications/unsubscribe-auth/AE0lSo6XxS-YJ3jk1i1oO6MInOPObQ1aks5qmwajgaJpZM4J0lv6 .
essentially closed with 4038602
Problem
Depending on how breaks are specified, lowest values are included or not.
cut(sample(10), breaks = 2)
gives the levels 1-5 and 6-10 (because the default is overwritten internally on line 78, whilecut(sample(10), breaks = c(1, 5, 10)
gives the levels 2-5 and 6-10.Suggested solution
Probably due to the default in cut.default, you wanted to keep include.lowest = FALSE. I think it is a counter intuitive default, so let's do away with it and change it to TRUE and hence remove line 78.