Learn R Programming

stringfish (version 0.19.2)

sf_writeLines: sf_writeLines

Description

A function that writes text line by line

Usage

sf_writeLines(text, file, sep = "\n", na_value = "NA", encode_mode = "UTF-8")

Arguments

text

A character to write to file

file

Name of the file to write to

sep

The line separator character(s)

na_value

What to write in case of a NA string

encode_mode

"UTF-8" or "byte". If "UTF-8", text strings are normalized to UTF-8 while `CE_BYTES` strings are written as raw bytes.

Details

A function for writing text data using `std::ofstream`.

See Also

writeLines

Examples

Run this code
file <- tempfile()
sf_writeLines(letters, file)
sf_readLines(file)

Run the code above in your browser using DataLab