Learn R Programming

xfun (version 0.48)

mark_dirs: Mark some paths as directories

Description

Add a trailing backlash to a file path if this is a directory. This is useful in messages to the console for example to quickly identify directories from files.

Usage

mark_dirs(x)

Arguments

x

Character vector of paths to files and directories.

Details

If x is a vector of relative paths, directory test is done with path relative to the current working dir. Use in_dir() or use absolute paths.

Examples

Run this code
mark_dirs(list.files(find.package("xfun"), full.names = TRUE))

Run the code above in your browser using DataLab