easystats / easystats/datawizard
Some minor (but breaking) suggestions for `categorize()`
Open
Nobody has claimed this yet.
- Dominant language
- R
- Stars
- 238
- Forks
- 18
- Avg merge
- 1d 15h
- Merged PRs (30d)
- 4
Description
- Current behavior is to return an integer vector. To be consistent with
cut(), and to be safer to use, I think this function should return by default a factor - possible an ordered factor.- also I think we can drop the
lowestargument?
- also I think we can drop the
- The
breaksargument in R is usually used to provide the breaking values - here if those are done manually, they are sent tosplitinstead. - Rename
splittomethod? -
- We should add a
right = TRUEargument, like withcut().
- We should add a
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Begin with the categorize() entry point and compare its current arguments and return behavior with R's cut(). The issue proposes several breaking API changes but names no files or tests, so first confirm which suggestions are accepted and where categorize() is tested. Done means the agreed API behavior is implemented and verified without leaving the proposal ambiguous.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- r
- Domain
- data
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100