xfim / ggmcmc

Graphical tools for analyzing Markov Chain Monte Carlo simulations from Bayesian inference
111 stars 31 forks source link

Fix bug causing order of parameters to get changed #37

Closed akrawitz closed 9 years ago

akrawitz commented 10 years ago

I believe the goal here is to remove the unused levels of the factor. droplevels(D.sub$Parameter) should be used for this, because the use of factor(as.character(D.sub$Parameter)) was causing the existing ordering of the levels of Parameter to be lost and to be replaced with a purely alphabetical ordering. This was leading to "x[10]" coming before "x[2]" for example. As a result, in parameters were in the wrong order in many of the ggs_ plotting functions if the "family" option was used.