"flexsurv " does not work

Dears, I am trying to undertake a survival analysis, however, flexsurv doesnt work with me.

install.packages("flexsurv")
library(flexsurv)

fitW <- flexsurvreg(Surv(eventtime,status) ~ factor(trt), data=dataset, dist= "gammaPH")

library(flexsurv)
Error: package or namespace load failed for ‘flexsurv’:
object ‘all_of’ is not exported by 'namespace:tidyselect'

fitW <- flexsurvreg(Surv(eventtime,status) ~ factor(trt), data=dataset, dist= "gammaPH")
Error in flexsurvreg(Surv(eventtime, status) ~ factor(trt), data = dataset, :
could not find function "flexsurvreg"

If I was in your shoes I would try to update my install of tidyselect first. I might update tidyverse entirely

Thanks .. I have tried install it. and I got the following:

(library(flexsurv)
Error: package or namespace load failed for ‘flexsurv’:
object ‘all_of’ is not exported by 'namespace:tidyselect')

what version are you using ?

packageVersion("tidyselect")

In 1.1.0, all_of is an exported function

it kinda worked but I got the following comments:

fitW <- flexsurvreg(Surv(eventtime,status) ~ factor(trt), data=dataset, dist= "gamma")
Warning messages:
1: In (function (q, shape, rate = 1, scale = 1/rate, lower.tail = TRUE, :
NaNs produced
2: In (function (q, shape, rate = 1, scale = 1/rate, lower.tail = TRUE, :
NaNs produced

and when I ran the code (fitW)
some results were NA

thank you

Thank you so much your advice worked..
I appreciate your time.

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.