measures_update {sentometrics} | R Documentation |
Update sentiment measures
Description
Updates a sento_measures
object based on a new sento_corpus
provided.
Sentiment for the unseen corpus texts calculated and aggregated applying the control variables
from the input sento_measures
object.
Usage
measures_update(sento_measures, sento_corpus, lexicons)
Arguments
sento_measures |
|
sento_corpus |
a |
lexicons |
a |
Value
An updated sento_measures
object.
Author(s)
Jeroen Van Pelt, Samuel Borms, Andres Algaba
See Also
sento_measures
, compute_sentiment
Examples
data("usnews", package = "sentometrics")
corpus1 <- sento_corpus(usnews[1:500, ])
corpus2 <- sento_corpus(usnews[400:2000, ])
ctr <- ctr_agg(howTime = "linear", by = "year", lag = 3)
l <- sento_lexicons(list_lexicons[c("LM_en", "HENRY_en")],
list_valence_shifters[["en"]])
sento_measures <- sento_measures(corpus1, l, ctr)
sento_measuresNew <- measures_update(sento_measures, corpus2, l)
[Package sentometrics version 1.0.0 Index]