goranbrostrom/eha

Error: weibsup not available / phsup no available

Closed this issue · 7 comments

Hi,

When I run the code line:
weibull.model0 <- weibreg(Surv(day, event)~strata(wood)+(familiarsexnsites), data=sqsurv.data, shape=0)

I get the following error:
Error in .C("weibsup", iter = as.integer(iter), as.double(control$eps), :
"weibsup" not available for .C() for package "eha"

The eha library is present and loaded, and the R script as a whole worked perfectly with earlier versions of R and eha (I am now on R 3.4.3 "Kite-Eating Tree"). I have updated eha as well as R.

I note that you planned eventually to abandon eha::weibreg(), because the Weibull distribution is included in eha::phreg - but changing the code to:
weibull.model0 <- weibreg(Surv(day, event)~strata(wood)+(familiarsexnsites), data=sqsurv.data, shape=0)
...gives a similar error:
Error in .C("phsup", iter = as.integer(iter), as.double(control$eps), :
"phsup" not available for .C() for package "eha"

Would greatly appreciate help!

That's really weird: I see nothing like that on my end. Could you send the output from 'sessionInfo()'?
However,I googled your error message (a good habit!) and got a few hits: The advise was to reinstall 'eha' after upgrading R to 3.4.3, maybe with

update.packages(checkBuilt = TRUE)

or

install.packages("eha", checkBuilt = TRUE)

Göran

Dear Jonathan,

if you have upgraded eha, after upgrading R to 3.4.3, and set the flag 'checkBuilt=TRUE' at the eha upgrade, and it still doesn't work, I'm lost. Maybe you could ask at R-help?

Regarding the other issue, 'plot' is a generic function and 'plot.weibreg' is an instance, and it is not exported, i.e., invisible to the user: Just use 'plot'. (You can use 'eha:::plot.weibreg' to call it directly, but it is not recommended.)

Hope this helps,

Best, Göran

One second thought: Is it possible that you have two instances of eha installed?