Skip to content

plot.sentiment_by ordered fix? #133

@edmundseto

Description

@edmundseto

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions