I am a package developer and I don't like the output of one of my package's functions when run in an RMarkdown code chunk within RStudio. Basically, I
cat some console output, then
cat some more console output.
In the console, this looks pretty straightforward. Example:
But if I do the same thing in a code chunk, the data frame is pulled from the output and pretty-printed (I think this is called paged printing).
While I totally understand why the paged printing is the default behavior, I hope it's clear why this isn't desirable in my case. I know I can tell users to change the
df_print parameter in the YAML header or set
options(paged.print = FALSE), but that's not really what I want to do because I think it's clearly more pain on the end user's part than it's worth. I've gotten a number of bug reports from users who in some cases don't notice that the console output is still visible even when the paged printing is used.
Is there something I can do within my print function to stop the paged printing without any other side effects? For instance, I don't want to do something that stops paged printing for data frames that aren't printed by my package, I just want control over how my functions print.