Closed pveber closed 3 years ago
Ok. Actually, it's not an "error", it's just that for some couple ('X', 'time_LCx') there is no value. But I agree, the error message is not clear at all. I'm going to work on it.
When there is no 'LCx' for a specific couple ('X', 'time_LCx'), the plot function should return:
The upper commit solve the issue. Try with different data set:
library(morse)
data(cadmium1)
data(cadmium2)
data(zinc)
data(copper)
fit_Cd1_SD = survFit(survData(cadmium1), model_type = 'SD')
fit_Cd1_IT = survFit(survData(cadmium1), model_type = 'IT')
fit_Cd2_SD = survFit(survData(cadmium2), model_type = 'SD')
fit_Cd2_IT = survFit(survData(cadmium2), model_type = 'IT')
fit_Cu_SD = survFit(survData(copper), model_type = 'SD')
fit_Cu_IT = survFit(survData(copper), model_type = 'IT')
plot(LCx(fit_Cd1_SD, X=50)) # Warning message
plot(LCx(fit_Cd1_SD, X=30)) # OK
plot(LCx(fit_Cd1_SD, X=40)) # OK
plot(LCx(fit_Cd1_IT, X=50)) # Warning message
plot(LCx(fit_Cd1_IT, X=30)) # OK
plot(LCx(fit_Cd1_IT, X=40)) # OK
plot(LCx(fit_Cd2_SD, X=50))
plot(LCx(fit_Cd2_SD, X=999)) # Warning message
plot(LCx(fit_Cd2_IT, X=50))
plot(LCx(fit_Cd2_IT, X=999)) # Warning message
plot(LCx(fit_Cu_SD, X=99))
plot(LCx(fit_Cu_IT, X=99)) # Warning message
The following code shows an error:
I get the following complaint:
Seems related to cadmium1 example.