hesselberthlab / scrunchy

R toolkit for the analysis of single-cell functional heterogeneity
https://scrunchy.hesselberthlab.org/
Other
2 stars 3 forks source link

Remove stringr dependency #26

Closed jayhesselberth closed 5 years ago

jayhesselberth commented 5 years ago

stringr is a heavy dependency:

It's only used in two places:

$ grep stringr *
scrunchy-package.R:#' @import stringr
utils.R:    bcs <- stringr::str_remove(bcs, "-[0-9]+$")
utils.R:    bcs <- stringr::str_c(cell_prefix, "_", bcs)

which could just be:

bcs <- gsub("-[0-9]+$", bcs)

and

bcs <- paste0(cell_prefix, bcs, sep = "_")