This function writes an object of class conc
to a file.
Arguments
- x
Object of class
conc
.- file
Path to output file.
- sep
Field separator for the columns in the output file.
See also
Other writing functions:
write_assoc()
,
write_fnames()
,
write_freqlist()
,
write_tokens()
,
write_txt()
,
write_types()
Examples
(d <- conc('A very small corpus.', '\\w+', as_text = TRUE))
#> Concordance-based data frame (number of observations: 4)
#> idx left|match |right
#> 1 | A |very small corpus.
#> 2 A| very |small corpus.
#> 3 A very|small |corpus.
#> 4 A very small|corpus|.
#>
#> This data frame has 6 columns:
#> column
#> 1 glob_id
#> 2 id
#> 3 source
#> 4 left
#> 5 match
#> 6 right
.old_wd <- setwd(tempdir())
write_conc(d, "example_data.tab")
(d2 <- read_conc("example_data.tab"))
#> Concordance-based data frame (number of observations: 4)
#> idx left|match |right
#> 1 | A |very small corpus.
#> 2 A| very |small corpus.
#> 3 A very|small |corpus.
#> 4 A very small|corpus|.
#>
#> This data frame has 6 columns:
#> column
#> 1 glob_id
#> 2 id
#> 3 source
#> 4 left
#> 5 match
#> 6 right
setwd(.old_wd)