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")
Run the code above in your browser using DataLab