Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for data.frames #24

Open
gasparl opened this issue Jun 16, 2022 · 5 comments
Open

Support for data.frames #24

gasparl opened this issue Jun 16, 2022 · 5 comments

Comments

@gasparl
Copy link

gasparl commented Jun 16, 2022

How about adding support for any sort of data.frame (and perhaps matrix)? This is really simple and would cover any conceivable statistics that can be put in a table format. I already have a helper function for it (df_to_group; it was needed for metafor's data.frame outputs), so we would just need to wrap it under a tidy_stats class.

@WillemSleegers
Copy link
Owner

That makes sense. Although it will be a bit tricky to figure out the symbols and potential subscripts. Although we could just omit those things.

@gasparl
Copy link
Author

gasparl commented Jun 16, 2022

Yes, it could be either omitted or added as optional via a parameter. (I already have a short list of replacements for "frequently occurring" symbols, see here; this could be expanded and used for this purpose.)

@WillemSleegers
Copy link
Owner

Good idea. It could be an optional argument that takes either a vector or a list. A vector could be provided in case the user wants to provide a symbol/subscript for all stats, or a list in case only some of the statistics should have a symbol and/or subscript.

For example: df_to_group(df, symbols = list("estimate" = "t"))

@WillemSleegers
Copy link
Owner

We should call the function something else though. Perhaps df_to_stats() or tidy_df().

@gasparl
Copy link
Author

gasparl commented Jun 20, 2022

As discussed, this became part of the add_stats function (with additional optional parameters) rather than a function on its own; see implemented here. I guess a short description of the optional parameters should be given somewhere in the documentation. Let me know if I should add it (and if yes, where).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants