reduce cyclomatic complexity
Opened this issue · 0 comments
turgeonmaxime commented
I ran lintr
on our package, and three functions were flagged as having high cyclomatic complexity:
casebase::absoluteRisk
casebase::absoluteRisk.CompRisk
casebase::fitSmoothHazard
Since high cyclomatic complexity means that it's harder to maintain the code (because it's more difficult to reason about it), it may be worth refactoring the code of these functions to decrease this complexity. This is definitely not urgent, but I thought I would flag it in case someone wants to have a look at it.