Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

write_lines_enc

Writes to a text file


Description

This function is a drop-in replacement for writeLines() from disk files. It always expects text in the UTF-8 encoding, and by default writes in the UTF-8 encoding with Unix line separators.

Usage

write_lines_enc(text, path, file_encoding = "UTF-8", sep = "\n")

Arguments

text

A character vector

path

Path to the file

file_encoding

The encoding for the output file.

sep

character string. A string to be written to the connection after each line of text.

See Also

readr::write_lines() for a faster alternative.

Other file functions: read_lines_enc(), transform_lines_enc()


enc

Portable Tools for 'UTF-8' Character Data

v0.2.2
GPL-3
Authors
Kirill Müller [aut, cre]
Initial release
2019-12-19

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.