listfiles: List files in a directory

Description Usage Arguments Value See Also Examples

Description

This function lets the user list all files on a given directory. It also lets filter files which contains a string.

Usage

1
listfiles(folder = getwd(), recursive = TRUE, regex = NA, images = FALSE)

Arguments

folder

Character. Directory which contains files

recursive

Boolean. Should the listing recurse into directories?

regex

Character. String to use for filtering files

images

Boolean. Bring only image files?

Value

data.frame with relevant data for each file on folder directory.

See Also

Other Tools: autoline(), bindfiles(), bring_api(), db_download(), db_upload(), export_plot(), export_results(), get_credentials(), h2o_predict_API(), h2o_predict_MOJO(), h2o_predict_binary(), h2o_predict_model(), h2o_selectmodel(), haveInternet(), image_metadata(), importxlsx(), ip_data(), json2vector(), mailSend(), msplit(), myip(), quiet(), read.file(), statusbar(), tic(), try_require(), updateLares(), zerovar()

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
# All files in current directory (without recursive files)
df <- listfiles(recursive = TRUE)
head(df, 3)

# All files in current directory (with recursive files)
df <- listfiles(recursive = TRUE)
tail(df, 3)

# Check R files using regex
df <- listfiles(regex = "\\.R$")

lares documentation built on June 9, 2021, 9:06 a.m.