co-analysis / a11ytables

R package: generate best-practice stats spreadsheets for publication
https://co-analysis.github.io/a11ytables/
Other
42 stars 3 forks source link

Automatically convert tab titles so they comply with requirements #78

Closed matt-dray closed 2 years ago

matt-dray commented 2 years ago

There seems to be a number of rules for tab titles (e.g. this unofficial page). I'm not sure if all spreadsheet programs agree on these rules, so may be better to be more conservative about any choices made.

I think {openxlsx} automatically handles autoconversion, but it would be nice for {a11ytable} to do it so that it won't be a surprise when the output xlsx has slightly different tab names.

So:

Could warn:

Could insert function .clean_tab_titles() into new_a11ytable() with a warning if any tab_titles have changed. Will also need a standalone warning in .warn_a11ytable() so that users ofas_a11ytable() also gets a warning. (~But wouldn't this then mean there'd be two separate warnings supplied to people who use new_a11ytable(), i.e. once when the tab_titles are cleaned and again in .warn_a11ytable()?~ No, obviously not, because they've been cleaned by the time they get to .warn_a11ytable()).

matt-dray commented 2 years ago

Once done, will need to update: