read_conc: Read a concordance from file

Description Usage Arguments Value See Also Examples

Description

Reads concordance-based data frames that are written to file with the function write_conc.

Usage

1
2
3
4
5
6
7
8
read_conc(file,
          header = TRUE,
          sep = "\t",
          quote = "",
          comment_char = "",
          file_encoding = "UTF-8",
          stringsAsFactors = default.stringsAsFactors(),
          ...) 

Arguments

file

name of the input file

header

boolean value that expresses whether or not the first line in the input file contains column names. In the current implementation of read_conc, the value of header is ignored and is assumed to be TRUE.

sep

the field separator that is used in the input file.

quote

boolean value that expresses whether or not character data fields in the file are enclosed in quotation marks. This argument is not used in the current implementation of read_conc. For the moment, character data are assumed not to be enclosed in quotes.

comment_char

not used in the current implementation of read_conc. For the moment the comment character mechanism is disabled.

file_encoding

the encoding used in the input file.

stringsAsFactors

boolean value: should character data automatically be converted to factors? This argument applies to all columns in the data, with the exception of the columns source, left, match, and right, which are never converted to factors.

...

not used in the current implementation of read_conc.

Value

The function read_conc returns a data frame of the class conc.

See Also

See also write_conc.

Examples

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

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