tidystats icon indicating copy to clipboard operation
tidystats copied to clipboard

User-defined JSON entries

Open gasparl opened this issue 2 years ago • 3 comments

There could be a very generic option to enter any sort of data to add_stats() with the user providing the formatting of the eventual report (i.e., the text and styling around the given statistical number values, and the formatting/rounding of the number values themselves).

gasparl avatar Apr 16 '22 07:04 gasparl

Hm I think styling can simply be a setting in the app, so it does not need to be part of the JSON files.

WillemSleegers avatar Apr 19 '22 08:04 WillemSleegers

What I meant about styling is just that for example what is italic/subscript/superscript etc., but I guess this is already to some degree possible via the existing structure. At any rate, the main point of this issue is simply that the user may be able to enter any sort of statistical test for which we have not (yet) written a dedicated method. (Since as I understood you already started working on this, the specific implementation is up to you; I opened this issue only as a reminder.)

gasparl avatar Apr 20 '22 09:04 gasparl

Yup, I have. add_stats() detects if you give it model output or a list. In the case of a list, it will directly add it to the list of results, so if you structure the list contents correctly, it will work. You can see an example of me doing this here.

The main issue I see with this implementation is that it requires the user to specify the list correctly, which will undoubtedly go wrong in the case of more complex analyses. We may want to add functions to make this easier, although I'd put this on a low priority for now.

WillemSleegers avatar Apr 20 '22 09:04 WillemSleegers