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

plot.sentiment_by ordered fix? #133

Open
edmundseto opened this issue Feb 12, 2023 · 0 comments
Open

plot.sentiment_by ordered fix? #133

edmundseto opened this issue Feb 12, 2023 · 0 comments

Comments

@edmundseto
Copy link

Great package! I appreciate your work on this.

When plotting a sentiment_by result, I noticed that it always orders groups by the median sentiment regardless of if I set the ordered parameter TRUE or FALSE.

I looked at the code for the plotting plot.sentiment_by on github and it doesn't seem like the ordered parameter is used.

I'm not sure, but I suggest this as potential fix in that function:

    if (ordered==TRUE) {
      x[, grouping.vars := factor(grouping.vars, levels = rev(grouping.vars))]
    } else {
      x[, grouping.vars := factor(grouping.vars)]
    }

Best,
Edmund

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

1 participant