tidyverts / tidyverts/fabletools

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

Open
#409 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
R
Stars
98
Forks
37
PR merge metrics
No merged PRs in 30d

Description

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!

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by locating the report() entry point and reviewing how utils::capture.output(report(mymodel)) currently collects its console output. Determine the intended object representation and how it should preserve report information across model formulations; done means callers can save the report result and reliably reformat or reorder it without parsing console strings.

Written by the indexing model from the issue text.

Assessment

Tech stack
r
Domain
tooling
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.