[R] NaN in Scoring Sentiment

Jeff Newmiller jdnewm|| @end|ng |rom dcn@d@v|@@c@@u@
Sat Aug 25 16:21:47 CEST 2018


Did you keep the resulting complete cases version of df?

dfc <- df[complete.cases(df),]

and then use that as input?

On August 25, 2018 7:00:47 AM PDT, Shivi Bhatia <shivipmp82 using gmail.com> wrote:
>Hi All- I am running a sentiment scoring model and the code is as
>below:
>sentiments_per_Category <- aggregate(relative_sentiment_frequencies,
>                                     by = list(Category =
>df$Case.Category), mean)
>
>while i run the head command most of the values are NaN. i then used
>complete.cases on my data frame
>df[complete.cases(df),]
>but it does not seems to work. Please advice if there is a way to
>handle
>NaN.
>
>Regards, Shivi
>
>	[[alternative HTML version deleted]]
>
>______________________________________________
>R-help using r-project.org mailing list -- To UNSUBSCRIBE and more, see
>https://stat.ethz.ch/mailman/listinfo/r-help
>PLEASE do read the posting guide
>http://www.R-project.org/posting-guide.html
>and provide commented, minimal, self-contained, reproducible code.

-- 
Sent from my phone. Please excuse my brevity.




More information about the R-help mailing list