
Last chance! 50% off unlimited learning
Sale ends in
Please Note: This function is maintained for legacy purposes. Users should consider using get_dct_transform() instead. Converts input values into a standardized set of filtered and reverse transformed values for easy plotting and/or comparison.
get_transformed_values(
raw_values,
low_pass_size = 2,
x_reverse_len = 100,
padding_factor = 2,
scale_vals = FALSE,
scale_range = FALSE
)
The transformed values
the raw sentiment values calculated for each sentence
The number of components to retain in the low pass filtering. Default = 3
the number of values to return. Default = 100
the amount of zero values to pad raw_values with, as a factor of the size of raw_values. Default = 2.
Logical determines whether or not to normalize the values using the scale function Default = FALSE. If TRUE, values will be scaled by subtracting the means and scaled by dividing by their standard deviations. See ?scale
Logical determines whether or not to scale the values from -1 to +1. Default = FALSE. If set to TRUE, the lowest value in the vector will be set to -1 and the highest values set to +1 and all the values scaled accordingly in between.
s_v <- get_sentences("I begin this story with a neutral statement.
Now I add a statement about how much I despise cats.
I am allergic to them.
Basically this is a very silly test.")
raw_values <- get_sentiment(s_v, method = "bing")
get_transformed_values(raw_values)
Run the code above in your browser using DataLab