write {SentimentAnalysis} | R Documentation |
Write dictionary to text file
Description
This routine exports a sentiment dictionary to a text file which can be the source for additional problems or controlling the output.
Usage
write(d, file)
## S3 method for class 'SentimentDictionaryWordlist'
write(d, file)
## S3 method for class 'SentimentDictionaryBinary'
write(d, file)
## S3 method for class 'SentimentDictionaryWeighted'
write(d, file)
Arguments
d |
Dictionary of type |
file |
File to which the dictionary should be exported |
See Also
read
for later access
Examples
d.out <- SentimentDictionary(c("uncertain", "possible", "likely"))
write(d.out, "example.dict")
d.in <- read("example.dict")
print(d.in)
d.out <- SentimentDictionary(c("increase", "rise", "more"),
c("fall", "drop"))
write(d.out, "example.dict")
d.in <- read("example.dict")
print(d.in)
d.out <- SentimentDictionary(c("increase", "decrease", "exit"),
c(+1, -1, -10),
rep(NA, 3),
intercept=5)
write(d.out, "example.dict")
d.in <- read("example.dict")
print(d.in)
unlink("example.dict")
[Package SentimentAnalysis version 1.3-5 Index]