dirr: dirr

dirrR Documentation

dirr

Description

a variant of dir that gsubs pattern from normal output of dir to name output vector

eg dirr(path, '.txt') will return dir output with .txt removed eg dirr(path, '.txt', '.rds' ) will return dir output with .txt subbed with .rds

Usage

dirr(x, pattern = NULL, rep = "", full = TRUE, ...)

Arguments

x

character of path to run dir on

pattern

character pattern to limit files to and to replace with rep

rep

character pattern to replace filenames with

full

whether to return full path

...

additional arguments to dir

Value

named vector of file paths, named by file names in dir gsub-stripped with pattern

Author(s)

Marcin Imielinski


mskilab/skitools documentation built on Aug. 31, 2023, 1:13 p.m.