Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

highlight issue #104

Closed
kenmcgarry opened this issue Mar 26, 2019 · 6 comments
Closed

highlight issue #104

kenmcgarry opened this issue Mar 26, 2019 · 6 comments

Comments

@kenmcgarry
Copy link

kenmcgarry commented Mar 26, 2019

Hi Thanks for this great package.

I've upgraded from sentimentr V2.6.1 to V 2.7.1 and one of the simpler examples I use no longer works. The more complicated examples you provide seem to work fine.

'My life has become terrible since I started work.' %>%
  sentiment_by(by = NULL) %>%
highlight()
Error in `[.data.table`(y, , list(sentiment = attributes(x)[["averaging.function"]](sentiment),  : 
  attempt to apply non-function 
@trinker
Copy link
Owner

trinker commented Mar 29, 2019

Thank you kindly for reporting. I can replicate. I'm guessing something simple.

@trinker
Copy link
Owner

trinker commented Apr 11, 2019

@kenmcgarry Thanks for the feedback. Fixed now. Give it a try.

@kenmcgarry
Copy link
Author

kenmcgarry commented Apr 12, 2019 via email

@zong-you
Copy link

Hi, I am using sentimentr V2.7.1 and am experiencing the same error as Ken when I use read.csv.

mytext <- c(
'do you like it? But I hate really bad dogs',
'I am the best friend.',
'Do you really like it? I'm not a fan'
)
write.csv(mytext, "mytext.csv")

mytext2 <- read.csv("mytext.csv")
mytext2 %>%
get_sentences() %>%
sentiment_by() %>%
highlight()

Error in [.data.table(y, , list(sentiment = attributes(x)["averaging.function"], :
attempt to apply non-function

@trinker
Copy link
Owner

trinker commented May 30, 2019

You need 2.8.0

@zong-you
Copy link

zong-you commented Jun 4, 2019

Yes version 2.8.0 does not have this issue. Thanks for your reply.

For the benefit of other users, you can download the latest version from Github using the following code:
install_github("trinker/sentimentr")

This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants