hello,
I would be happy to get some help..
i am trying to install coxph function but receive the massage:
install.packages("coxph")
Installing package into ‘C:/Users/USER/AppData/Local/R/win-library/4.2’
(as ‘lib’ is unspecified)
Warning in install.packages :
package ‘coxph’ is not available for this version of R
A version of this package for your version of R might be available elsewhere,
see the ideas at
thank you,
i tried to install again survival but them i get:
cox <- coxph(Surv(age, gender))
Error in coxph.control(...) : could not find function "coxph.control"
cox <- coxph(Surv(age, gender, data = g))
Error in coxph.control(...) : could not find function "coxph.control"
cox <- coxph(Surv(fu_time, death) , data = g)
Error in coxph.control(...) : could not find function "coxph.control"
cox <- coxph(Surv(fu_time, death) ~ ethnicgroup, data = g)
Error in coxph.control(...) : could not find function "coxph.control"
install.packages("coxph.control")
Installing package into ‘C:/Users/USER/AppData/Local/R/win-library/4.2’
(as ‘lib’ is unspecified)
Warning in install.packages :
package ‘coxph.control’ is not available for this version of R
A version of this package for your version of R might be available elsewhere,
see the ideas at
now tried to download it as version 3.5.0 and still same result:
install.packages("survival", version='3.5.0')
Installing package into ‘C:/Users/USER/AppData/Local/R/win-library/4.2’
(as ‘lib’ is unspecified)
trying URL 'https://cran.rstudio.com/bin/windows/contrib/4.2/survival_3.5-5.zip'
Content type 'application/zip' length 6602925 bytes (6.3 MB)
downloaded 6.3 MB
package ‘survival’ successfully unpacked and MD5 sums checked
The downloaded binary packages are in
C:\Users\USER\AppData\Local\Temp\RtmpqwhrqZ\downloaded_packages
cox <- coxph(Surv(fu_time, death) ~ ethnicgroup, data = g)
Error in coxph.control(...) : could not find function "coxph.control"
I'm guessing you havent restarted your R session, since installing survival package again ?
restart your R clean, without restoring your workspace and try again
p.s. install.packages does not have a version command, so you installed the latest available version (which is not a bad thing) , but you seemed unaware of that, so I thought I'd point it out.