Parses files with no column names. Selects the schema version whose column count matches the file.
Arguments
- fpath
(
character(1))
File path.- pname
(
character(1))
Parser name (e.g. "table4" - see docs).- schemas_all
(
tibble())
Tibble with name, version and schema list-col.- delim
(
character(1))
File delimiter.- ...
Passed on to
readr::read_delim.
Examples
path <- system.file("extdata/tool1", package = "nemo")
x <- Tool$new("tool1", pkg = "nemo", path)
schemas_all <- x$config$get_schemas_raw()
pname <- "table4"
fpath_latest <- file.path(path, "latest", "sampleA.tool1.table4.tsv")
fpath_v1 <- file.path(path, "v1.0.0", "sampleA.tool1.table4.tsv")
(d_latest <- parse_file_nohead(fpath_latest, pname, schemas_all))
#> # A tibble: 2 × 5
#> X1 X2 X3 X4 X5
#> <chr> <chr> <int> <int> <dbl>
#> 1 sampleA chr1 100 500 32.5
#> 2 sampleB chr2 200 800 18.1
(d_v1 <- parse_file_nohead(fpath_v1, pname, schemas_all))
#> # A tibble: 2 × 3
#> X1 X2 X3
#> <chr> <chr> <int>
#> 1 sampleA chr1 100
#> 2 sampleB chr2 200
