Functions deprecated due to changed naming or because functionality is discarded. Deprecated functions are made defunct every 1 major or every 2 minor package updates. See the NEWS file for more information about since when or why functions have been deprecated.
fill_measures(sentomeasures, fill)merge_measures(...)
to_global(sentomeasures, lexicons, features, time)
subset_measures(sentomeasures, subset)
select_measures(sentomeasures, toSelect)
setup_lexicons(lexiconsIn, valenceIn, do.split)
retrieve_attributions(model, sentomeasures, do.normalize, refDates, factor)
perform_agg(sentiment, ctr)
plot_attributions(attributions, group, ...)
almons(n, orders, do.inverse, do.normalize)
exponentials(n, alphas)
an appropriate sentomeasures
object created using sento_measures
.
an element of c("zero", "latest", NA)
; the first and last assume missing dates represent zero sentiment,
the second assumes missing dates represent constant sentiment.
(other) allowed input arguments.
a numeric
vector of weights, of size length(sentomeasures$lexicons)
, in the same order.
By default set to 1, which means equally weighted.
a numeric
vector of weights, of size length(sentomeasures$features)
, in the same order.
By default set to 1, which means equally weighted.
a numeric
vector of weights, of size length(sentomeasures$time)
, in the same order. By default
set to 1, which means equally weighted.
a logical expression indicating the rows to keep.
a character
vector of the lexicon, feature and time weighting scheme names, to indicate which
measures need to be selected, or as a list
of character
vectors, possibly with separately specified
combinations (only consisting of one lexicon, one feature, and one time weighting scheme at maximum).
a named list
of (raw) lexicons, each element as a data.table
or a data.frame
with
respectively a words column and a polarity score column. A subset of the already formatted built-in lexicons
accessible via list_lexicons
should be passed here first.
a single valence word list as a data.table
or a data.frame
with respectively a "x"
and a "y"
or "t"
column. The first column has the words, "y"
has the values for bigram
shifting, and "t"
has the types of the valence shifter for a clustered approach to sentiment calculation
(supported types: 1
= negators, 2
= amplifiers, 3
= deamplifiers). If three columns
are provided, the first two will be considered only. This argument can be one of the already formatted
built-in valence word lists accessible via list_valence_shifters
. A word that appears in both a lexicon
and the valence word list is prioritized as a lexical entry during sentiment calculation. If NULL
, no valence word
list is part of this function's output, and is thus not applied in the sentiment analysis.
a logical
that if TRUE
splits every lexicon into a separate positive polarity and negative
polarity lexicon.
a sentomodel
or sentomodeliter
object created with sento_model
.
a logical
, TRUE
divides each element of every attribution vector at a given date by its
L2-norm at that date, normalizing the values between -1 and 1. The document attributions are not normalized. Or, for
almons
, if TRUE
, then polynomials should be normalized to unity.
the dates (as "yyyy-mm-dd"
) at which attribution is to be performed. These should be between the latest
date available in the input sentomeasures
object and the first estimation sample date (that is, model$dates[1]
if model
is a sentomodel
object). All dates should also be in get_dates(sentomeasures)
. If
NULL
(default), attribution is calculated for all in-sample dates. Ignored if model
is a sentomodeliter
object, for which attribution is calculated for all out-of-sample prediction dates.
the factor level as a single character
vector for which attribution has to be calculated in
case of (a) multinomial model(s). Ignored for linear and binomial models.
output from a compute_sentiment
call, computed from a sentocorpus
object.
output from a ctr_agg
call. The howWithin
and nCore
elements are ignored.
an attributions
object created with attributions
.
a value from c("lags", "lexicons", "features", "time")
.
a numeric
vector as the sequence of the Almon orders (cf., b). The maximum value
corresponds to B.
TRUE
if the inverse Almon polynomials should be calculated as well.
a numeric
vector of decay factors.