Skip to content

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.

@shahronak47 shahronak47 requested a review from tonyfujs June 12, 2022 05:33
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