Clarify responsibilities and performance of `format_cropr()` and `generic_formatting()`
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 25/100
- Issue type
- Refactor
- Clarity
- Mostly clear
- Activity status
- Stale
- Tech stack
- r
- Domain
- data-visualization
Research direction
Start by reading generic_plotting(), generic_stats(), generic_formatting(), and format_cropr() to trace how each function is used. Benchmark the two formatting functions on representative data and investigate any bottlenecks. Done means documenting their responsibilities and architectural rationale, with any justified optimizations supported by performance results.
Written by the indexing model from the issue text.
Description
Description
The formatting pipeline currently relies on two distinct functions:
generic_formatting(), used exclusively ingeneric_plotting().format_cropr(), used in bothgeneric_plotting()andgeneric_stats().
There is no functional overlap between these two formatting functions. However, their articulation within the workflow — especially in generic_plotting() where they are both involved — would benefit from clearer documentation and architectural explanation.
Points to clarify
-
What is the precise conceptual role of
format_cropr()compared togeneric_formatting()?- Why is
generic_formatting()restricted togeneric_plotting()? - Why is
format_cropr()shared betweengeneric_plotting()andgeneric_stats()?
- Why is
-
Is the current separation driven by data structure constraints, API design, or historical evolution?
Even if the separation is justified, this design choice should be made explicit in documentation or internal comments to improve readability and maintainability.
Performance considerations
Since format_cropr() is used in both plotting and statistics workflows, and generic_formatting() is part of the plotting pipeline, their computational cost may directly impact performance — particularly for large datasets.
It would therefore be useful to:
- Benchmark the execution time of both functions.
- Identify possible bottlenecks.
- Optimize critical sections where feasible.
Proposed actions
- Explicitly document the responsibilities and scope of each function.
- Clarify the architectural rationale behind their current distribution across
generic_plotting()andgeneric_stats(). - Profile and benchmark both functions.
- Optimize implementation where performance gains are possible.
- Dominant language
- R
- Stars
- 1
- Forks
- 3
- Avg merge
- 9h 41m
- Merged PRs (30d)
- 2
Getting set up
- No Dockerfile or Docker Compose file
- No pull request template
- Read the contributing 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.
More from SticsRPacks/CroPlotR
-
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
SticsRPacks/CroPlotR#185 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
SticsRPacks/CroPlotR#180 ·
-
Difficulty 3/5 1-2 days Newbie friendliness 55/100
SticsRPacks/CroPlotR#186 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 57/100
SticsRPacks/CroPlotR#181 ·
-
enhancement
Difficulty 3/5 Half a day Newbie friendliness 64/100
SticsRPacks/CroPlotR#173 ·
All issues in SticsRPacks/CroPlotR
Similar issues
-
1.7
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
pharmaverse/admiral#3235 ·
Maintainers usually reply within 2 days
-
Typo: p.381Open
Difficulty 1/5 Under an hour Newbie friendliness 95/100
rmcelreath/rethinking#482 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
Maintainers usually reply within 1 day