Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

separate function to handle missing function arguments #211

Open
wants to merge 5 commits into
base: PROD
Choose a base branch
from

Conversation

shahronak47
Copy link
Contributor

  • This part of code is repeated at 3 places, hence a separate function has been created for it.
if (!is.null(ppp)) {
    requested_mean <- requested_mean * default_ppp / ppp
  } else {
    ppp <- default_ppp
  }
  • Since, two different values are impacted here (requested_mean and ppp) return them as a list from the function.
  • Wherever those values are used later in the function used list_name$requested_mean and list_name$ppp respectively.
  • Include tests for the new function created.

Base automatically changed from dev to master December 22, 2022 11:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Refactor handling of missing function arguments and PPP adjustments
1 participant