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

Saving report() as an object rather than displaying on the console #409

Open
andrewbcooper opened this issue Sep 4, 2024 · 1 comment
Open

Comments

@andrewbcooper
Copy link

I've poked around quite a bit but haven't found anything about this. The report() function is fantastic, but I can only get it to display on the console. I'm not able to save it as an object and then, say, reformat it or re-arrange the elements in a Markdown document. I've been able to partially accomplish this using:

myoutput <- utils::capture.output(report(mymodel))

But that's pretty clunky (and I don't trust that the location of the character strings will be consistent across different model formulations) Is there an option within the report() function to save it as an object?

Thanks!

@mitchelloharawild
Copy link
Member

report() is intended as a console output allowing you to see an overview of the model.
Consistency of character strings is dependent on the console width.

All aspects of the models shown in report() can be obtained using tidy() and glance() for coefficients and statistics respectively. Using these functions is the recommended approach to programmatically interact with models.

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