read_fnames {mclm}R Documentation

Read a collection of filenames from a text file

Description

This function reads an object of class fnames from a text file, which is assumed to contain one filename on each line.

Usage

read_fnames(file, sep = NA, file_encoding = "UTF-8", trim_fnames = FALSE, ...)

Arguments

file

Path to input file.

sep

Character vector of length 1 or NA. If it is a character, it indicates a separator between input files, in addition to the new line.

file_encoding

Encoding used in the input file.

trim_fnames

Boolean. Should leading and trailing whitespace be stripped from the filenames?

...

Additional arguments (not implemented).

Value

An object of class fnames.

See Also

write_fnames()

Other reading functions: read_assoc(), read_conc(), read_freqlist(), read_tokens(), read_txt(), read_types()

Examples


cwd_fnames <- as_fnames(c("file1.txt", "file2.txt"))
write_fnames(cwd_fnames, "file_with_filenames.txt")
cwd_fnames_2 <- read_fnames("file_with_filenames.txt")


[Package mclm version 0.2.7 Index]