R/notes.R

#'
#' # 1. scrape the cran archives
#' archives = ARC()
#' 
#' # 2. live packages are anything in available.packages()
#' live = LIVE()
#' 
#' # 3. dead packages are in the archives but not live
#' dead = DEAD(live, archives)
#' 
#' # 4. make a data frame of name, birth, death[NA for live]
#' sd = survival_data(live, dead)
#'
#'

#' # 5. compute numeric start/end/event flag
#' bd = survpack(sd)
#'
#' # 6. do long names survive better than short names?
#' bd$long = nchar(as.character(bd$name))> 8

#' # 7. fit model (maybe, need to revise this...)
#' f = survfit(Surv(start, end, event) ~ long, data=bd)

#' # 8. get covariates
#' package_covars = survival_covariates(bd$name, verbose=TRUE)
#'
#' # 9. add covariates
#' bd = cbind(bd, package_covars)
#'
#' # 10. fit model
#'
#' m1 = coxph(Surv(life, event)~meanDepends+meanImports+meanSuggests, bd)
#' 
barryrowlingson/cransurv documentation built on Feb. 6, 2020, 4:41 a.m.