pveber / morse

Companion R package for MOSAIC website
7 stars 5 forks source link

Warning in LCx and Title for plot LCx are misleading #265

Closed virgile-baudrot closed 3 years ago

virgile-baudrot commented 6 years ago

Title of LCx plot is wrong:

Example with this code:

library(morse)
data("cadmium2")
fit <- survFit(survData(cadmium2), model_type = "SD")
LCx_fit <- LCx(fit, X = 20)
plot(LCx_fit)

Title of plot is "Concentration-response: LC 80 at time 56"

ALSO, Warnings are not correct. Using previous code:

LCx(fit, X = 20, conc_range = c(0,50))

return:

Warning messages:
1: In pointsLCx(df_dose, X_prop) :
  No median for LC 74.4402161753651  in the range of concentrations under consideration: [ 0 ; 50 ]
2: In pointsLCx(df_dose, X_prop) :
  No 95%inf for LC 74.4402161753651  in the range of concentrations under consideration: [ 0 ; 50 ]
3: In pointsLCx(df_dose, X_prop) :
  No 95%sup for LC 74.4402161753651  in the range of concentrations under consideration: [ 0 ; 50 ]

But should should return something like "[...] No median for survival rate 0.744402161753651 [...]"