Closed sdcharle closed 3 years ago
mytext <- c( 'do you like it? It is red. But I hate really bad dogs', 'I am the best friend.', "Do you really like it? I'm not happy" )
ss <- sentiment_by(mytext)
highlight(ss)
gives this:
Error in [.data.table(y, , list(sentiment = attributes(x)["averaging.function"], : attempt to apply non-function
[.data.table
Doing this:
attr(ss, "averaging.function") <- sentimentr::average_downweighted_zero
will make highlight work, but is clunky :/
https://stackoverflow.com/questions/57477146/text-highlighting-using-sentimentr-and-shiny-on-flexdashboard-in-r-is-throwing-e/57480153
My issue still is not resolved...
Hello. I beleieve this is the same issue as https://github.com/trinker/sentimentr/issues/104. Can you try with the development version and see if this persists?
mytext <- c( 'do you like it? It is red. But I hate really bad dogs', 'I am the best friend.', "Do you really like it? I'm not happy" )
ss <- sentiment_by(mytext)
highlight(ss)
gives this:
Error in
[.data.table
(y, , list(sentiment = attributes(x)["averaging.function"], : attempt to apply non-functionDoing this:
attr(ss, "averaging.function") <- sentimentr::average_downweighted_zero
will make highlight work, but is clunky :/