get_prefix: get DiViMe prefixes for all rttm files in a location

Description Usage Arguments Value Examples

View source: R/get_prefix.R

Description

get DiViMe prefixes for all rttm files in a location

Usage

1
get_prefix(loc, include_subfolders = FALSE)

Arguments

loc

character, path that contains .rttm files

include_subfolders

logical, include files in subfolder (default is FALSE)

Value

a data frame

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
X <- dirname(list.files(system.file("", package = "avutils"), full.names = TRUE)[1])
get_prefix(X)
# with files in subfolders:
tdir <- tempdir()
dir.create(file.path(tdir, "test"))
dir.create(file.path(tdir, "test/subfolder"))
file.copy(from = system.file("yunitator_old_spanish.rttm", package = "avutils"),
          to = file.path(tdir, "test/subfolder/yunitator_old_spanish.rttm"))
file.copy(from = system.file("tocomboSad_BER_0485_12_07_09123.rttm", package = "avutils"),
          to = file.path(tdir, "test/tocomboSad_BER_0485_12_07_09123.rttm"))
get_prefix(file.path(tdir, "test"))
get_prefix(file.path(tdir, "test"), include_subfolders = TRUE)

gobbios/avutils documentation built on Feb. 19, 2020, 9:44 a.m.