thijsjanzen / nLTT

Repository for the R nLTT package
GNU General Public License v2.0
6 stars 4 forks source link

Fix lintr warnings in nltt_diff_exact_extinct. Progress #52 #55

Closed Neves-P closed 4 years ago

Neves-P commented 4 years ago

As described in #52, @lintr-bot gives warnings regarding cyclomatic complexity. I have reduced it in nltt_diff_exact_extinct() by splitting the input checking onto a dedicated, internal function: check_input_event_times(). In the processes I also (hopefully) simplified and made a few checks slightly more legible. As far as I can see all tests and checks pass, so this should contribute to fixing #52!

@thijsjanzen, @richelbilderbeek, please let me know if I can help further, of if I should make some modifications on my additions đź‘Ť

lintr-bot commented 4 years ago

R/get_average_nltt_matrix.R:14:1: style: functions should have cyclomatic complexity of less than 15, this has 16.

​get_average_nltt_matrix <- function(
^

R/nltts_plot.R:19:1: style: functions should have cyclomatic complexity of less than 15, this has 17.

​nltts_plot <- function(
^

R/stretch_nltt_matrix.R:22:1: style: functions should have cyclomatic complexity of less than 15, this has 16.

​stretch_nltt_matrix <- function(
^
codecov[bot] commented 4 years ago

Codecov Report

:exclamation: No coverage uploaded for pull request base (develop@a38f6a4). Click here to learn what that means. The diff coverage is 100%.

Impacted file tree graph

@@           Coverage Diff            @@
##             develop    #55   +/-   ##
========================================
  Coverage           ?   100%           
========================================
  Files              ?     13           
  Lines              ?    555           
  Branches           ?      0           
========================================
  Hits               ?    555           
  Misses             ?      0           
  Partials           ?      0
Impacted Files Coverage Δ
R/nltt_diff_exact_extinct.R 100% <100%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update a38f6a4...3a0496a. Read the comment docs.