write_dataset: Write a linguistic dataset (of the type used in 'mclm') to...

Description Usage Arguments Value See Also Examples

Description

Writes to file datasets of the type that are read with read_dataset, etc. In principle, it should also be possible to write such datasets with the function write.table, but in some locales the function write_dataset can prove to be slightly more robust in case the files contain Non-Western language data.

Usage

1
2
3
4
write_dataset(x,
              file = "",
              sep = "\t",
              file_encoding = "UTF-8")

Arguments

x

the dataset that is to be written to file

file

name of the output file

sep

the field separator that is to be used in the output file.

file_encoding

the encoding that is to be used in the output file.

Value

The function write_dataset (invisibly) returns the value of its first argument, viz. x.

See Also

See also read_dataset.

Examples

1
2
3
4
d <- conc_re('\\w+', 'A very small corpus.', as_text = TRUE)
write_dataset(d, "example_data.tab")
d2 <- read_dataset("example_data.tab")
d2

wai-wong-reimagine/mclm documentation built on May 16, 2019, 9:12 p.m.