get_paths: Extract path(s) to files in a directory

View source: R/fetch_vectronics.R

get_pathsR Documentation

Extract path(s) to files in a directory

Description

Extract path(s) to files in a directory

Usage

get_paths(key_dir, ext = "keyx$", ...)

Arguments

key_dir

Path to a directory

ext

Defaults to keyx, which should be correct for Vectronics key files, but could also be a regular expression used to match any file extension.

...

other arguments to pass to list.files, see ?list.files

Value

full path to each file matching ext

See Also

Other get: get_id_from_key(), get_keys()

Examples

# Example collar key
get_paths(
  system.file("extdata", package = "collar"),
  ext = "keyx$"
)

# Example trap key
get_paths(
  system.file("extdata", "TrapKeys", package = "collar")
)

# All csv files included in this package
get_paths(
  system.file("extdata", package = "collar"),
  ext = "csv$"
)

# All keyx files included with this package
get_paths(system.file("extdata", package = "collar"), recursive = TRUE)

Huh/collar documentation built on Aug. 5, 2022, 11:02 p.m.