Skip to contents

Tidies files into a tibble with parsed data.

Usage

tidy_files(x, envir = parent.frame())

Arguments

x

Tibble with localpath to file and the function type to parse it. The function must return a tibble with a name column and the tidied data as a list-column (see example).

envir

the environment in which to evaluate the function e.g. use self when using inside R6 classes.

Value

Tibble with parsed data in a data list-column.

Examples

if (FALSE) { # \dontrun{
p1 <- "~/icav1/g/production/analysis_data/SBJ01155/umccrise/202408300c218043"
p2 <- "L2101566__L2101565/SBJ01155__PRJ211091/cancer_report_tables"
p <- file.path(p1, p2, "SBJ01155__PRJ211091-qc_summary.tsv.gz")
fun <- function(x) {
  d <- readr::read_tsv(x)
  tibble::tibble(name = "table1", data = list(d[]))
}
x <- tibble::tibble(type = "fun", localpath = p)
tidy_files(x)
} # }