Merck / Merck/wpgsd

Rename `foo()`

Open
#24 5 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
R
Stars
4
Forks
2
PR merge metrics
No merged PRs in 30d

Description

There is an internal function defined inline named foo():

https://github.com/Merck/wpgsd/blob/2214c5d79f8c06425893f07a16df9f306e919c7d/R/calc_seq_p.R#L74

This function should be updated:

  1. Rename it to use a meaningful function name. See foo in Google's developer documentation style guide.
  2. Define it outside the export function. This is because currently this is only accessible within the parent function, and it is being redefined again every time the parent function is called, which is suboptimal for performance.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start at R/calc_seq_p.R around line 74 and inspect the inline foo() definition within the export function. Choose a meaningful name, move the function outside its parent, and verify that the export function still uses it without redefining it on each call.

Written by the indexing model from the issue text.

Assessment

Tech stack
r
Domain
data
Issue type
Refactor
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.