gavinsimpson / gratia

ggplot-based graphics and useful functions for GAMs fitted using the mgcv package
https://gavinsimpson.github.io/gratia/
Other
206 stars 28 forks source link

Move added columns in add_sizer() to before data columns #248

Closed gavinsimpson closed 10 months ago

gavinsimpson commented 10 months ago

add_sizer(obj) adds columns .change or .decrease and .increase to obj. It would be nicer to move these so that they come before the data columns

> names(tbl)                                                                                      
 [1] ".smooth"     ".by_var"     ".fs_var"     ".derivative" ".se"         ".crit"      
 [7] ".lower_ci"   ".upper_ci"   "x0"          "x1"          "x2"          "x3"         
[13] ".decrease"   ".increase"

so .decrease and .increase would move to before x0 in the above example