It would be nice to have a warning if the R value returned by earlyR is equal to the maximum value considered in the grid of R values, i.e. max_R.
See for example the code below, where the first call clearly provide a wrong answer but there is now way for the user to realise (particularly dangerous here as the value of max_R is set by default not explicitly by the user
compare:
get_R(c(1, 2, 3, 4, 5, 6), disease = "Ebola") # returns an estimate of R = 10
and:
get_R(c(1, 2, 3, 4, 5, 6), disease = "Ebola", max_R = 40) # returns an estimate of R = 21.5