Learn R Programming

stRoke (version 23.9.1)

files_filter: Filter files in a folder

Description

This function filters files in a folder based on the provided filter.

Usage

files_filter(folder.path, filter.by, full.names = TRUE)

Value

character vector. Filtered files

Arguments

folder.path

character. Path of the folder to be filtered

filter.by

character. Filter to be applied on the files

full.names

logical. Whether to return full file names or not

Examples

Run this code
# Gives path to files/folders with "tests" in the name in the 
# working directory
files_filter(getwd(),"tests")

Run the code above in your browser using DataLab