I have a matter which I couldn't solve for past couple of days. Which is: I want to trycatch() when logspline is not converging. My part of the code which has to do that looks like this:
tryCatch({
pl1<-logspline(cost_disease,lbound=0,ubound=max(cost_disease), error.action=1)
pl2<-logspline(cost_disease1,lbound=0,ubound=max(cost_disease1), error.action=1)
dev.off()
},
error=function(e){cat("Logspline failed!",conditionMessage(e), "\n")})
I mention that I am using R shiny. And i still get this error :
Error in oldlogspline(x, lbound = jlx, ubound = jux) : * no convergence
Thank you!