Novartis / xgxr

R package for supporting exploratory graphics at http://opensource.nibr.com/xgx
Other
13 stars 7 forks source link

Feature request: support minutes in `xgx_scale_time_units_()` #63

Closed billdenney closed 1 year ago

billdenney commented 1 year ago

I needed a minutes x-axis for a current dataset, but xgx_scale_time_units_() only supports between hours and years.

  1. Would a PR to add "min" and "minutes" to the units_dataset and units_plot options be considered?
  2. Currently, if you give units_dataset = "min", then it assumes that the units are "months" which is inaccurate. I think that stricter input testing would be helpful to prevent unintentional unit assignment.
iamstein commented 1 year ago

minutes and seconds have now been added (though "min" won't work, requires full unit name now of year, month, week, day, hour, minute, second). The only flexibility is in capitalization and in ending the unit with an "s" otherwise an error is thrown.

billdenney commented 1 year ago

Thanks!