dir.out: Concatenates a path, filename, and file extension into an...

View source: R/dirfns.R

dir.outR Documentation

Concatenates a path, filename, and file extension into an output path, then writes data x to the output path using function fn. Any folders in the path that do not exist are created.

Description

Concatenates a path, filename, and file extension into an output path, then writes data x to the output path using function fn. Any folders in the path that do not exist are created.

Usage

dir.out(x, fn, filename, ext = "txt", path = ".", ..., append.date = T)

Arguments

x

Data to be written to filename.

fn

Function that accepts x as its first argument and a file path as its second argument.

filename

The output file name.

ext

The file extension.

path

The path to the output file.

...

Additional arguments to fn.

append.date

Whether to write the output to a directory with today's date.

Value

The resulting value of fn.

Examples

dir.out(iris, write.table,"example","txt",path="path/to")

kewiechecki/dirfns documentation built on June 8, 2025, 5:18 a.m.