write_lines: Write Lines to a File

View source: R/utils.R

write_linesR Documentation

Write Lines to a File

Description

Write text lines to a file.

Usage

write_lines(text, path, gz = FALSE)

Arguments

text

'character' vector. Text to write to file.

path

'character' string. Path to the file.

gz

'logical' flag. Whether to compress the file using Gzip. The .gz extension is added to the file path.

Value

Invisibly returns the extracted path(s).

Author(s)

J.C. Fisher, U.S. Geological Survey, Idaho Water Science Center

Examples

path <- write_lines(
  text = "Test",
  path = tempfile(fileext = ".txt"),
  gz = TRUE
)

unlink(path)

inldata documentation built on Sept. 12, 2024, 9:34 a.m.