llrs / rutils

Personal package for helping with my day to day work
https://llrs.github.io/rutils/
GNU General Public License v3.0
4 stars 0 forks source link

Add helpers to create file names for CNAG projects #9

Closed llrs closed 6 months ago

llrs commented 6 months ago

Add helper for CNAG but for all projects:

file_EPIVIRCO <- function(x, path = "/home/data/") {
  stopifnot(is.integer(x))
  if (nchar(x) < 2L) {
    x <- paste0("0", x)
  }
  paste0(path, "XXXX_", x, "/XXXX_", x, ".xls")
}

stats_EPIVIRCO <- function(x, path = "/home/data/") {
  stopifnot(is.integer(x))
  if (nchar(x) < 2L) {
    x <- paste0("0", x)
  }
  paste0(path, "XXXX_", x, "/XXXX_", x, "_Sample_Stats.xls")
}
llrs commented 6 months ago

Functions created: llrs_cnag_stats_file and llrs_cnag_project_file