laresbernardo / lares

Analytics & Machine Learning R Sidekick
https://laresbernardo.github.io/lares/
233 stars 49 forks source link

lares - plot_timeline sorts alphabetically #14

Closed anelda closed 5 years ago

anelda commented 5 years ago

Hi @laresbernardo! Thanks so much for developing this fun and easy to use package.

I tried to use it on my own data (deliverables for a project), but find that the deliverables (in your case the events) are sorted according to the alphabetical order of the groups.

I can share my script and data with you if you want to explore?

Thanks! Anelda

anelda commented 5 years ago

@laresbernardo I think this happens when you create cv_long line 42.

If you rather use type = rep(factor(df$Type, order = TRUE),2) this might prevent the automatic reordering.

laresbernardo commented 5 years ago

Hey @anelda glad you are enjoying the library. I use it every day for almost everything! I'll push that change for you! Thanks for sharing your case and solution. That was easy 👍

laresbernardo commented 5 years ago

Done: https://github.com/laresbernardo/lares/commit/ddd2cf7808bd09b8474f056726c5241b1f6db571