as.yaml: Convert quanteda dictionary objects to the YAML format

Description Usage Arguments Value Examples

Description

Converts a quanteda dictionary object constructed by the dictionary function into the YAML format. The YAML files can be edited in text editors and imported into quanteda again.

Usage

1

Arguments

x

a dictionary object

Value

as.yaml a dictionary in the YAML format, as a character object

Examples

1
2
3
4
5
6
7
## Not run: 
dict <- dictionary(list(one = c("a b", "c*"), two = c("x", "y", "z??")))
cat(yaml <- as.yaml(dict))
cat(yaml, file = (yamlfile <- paste0(tempfile(), ".yml")))
dictionary(file = yamlfile)

## End(Not run)

quanteda/quanteda documentation built on June 15, 2019, 8:36 a.m.