write_txt {mclm}R Documentation

Write a character vector to a text file

Description

This function writes a character vector to a text file. By default, each item in the character vector becomes a line in the text file.

Usage

write_txt(x, file = "", line_glue = "\n")

Arguments

x

A character vector.

file

Name of the output file.

line_glue

Character string to be used as end-of-line marker on disk or NA for no end-of-line marker (so that x becomes a single line).

Value

Invisibly, x.

See Also

read_txt()

Other writing functions: write_assoc(), write_conc(), write_fnames(), write_freqlist(), write_tokens(), write_types()

Examples


x <- "This is
a small
text."

# write the text to a text file
write_txt(x, "example-text-file.txt")
# read a text from file
y <- read_txt("example-text-file.txt")
y


[Package mclm version 0.2.7 Index]