You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
granovagg.1w, granovagg.ds, and granovagg.cont all print tabular output after being called. And they kind of force it.
That forcing sucks when working with RMarkdown, because within code chunks you'll get output (designed for interactive R sessions, not publication) that still forcibly prints:
All of the output offset by ## is the forced printed output. And, yes, it's possible to suppress that output in an RMarkdown code chunk using suppression options, particularly results='hide':
We add a parameter (hooray!) or two to each function that allows the following:
Choosing to print or not print tabular output. This option should default to TRUE, so existing users don't see any difference.
If tabular output, getting to choose current plain-text output or formatted xtable output. And, this option should default to plain, again so existing users don't see any difference.
The idea is that if you're using an RMarkdown document, you know what you're doing, and you'd request (if required) xtable-formatted output, or none at all.
On the development side, what we'll need to do, I think, is add guard checks to the functions that print:
if (print.table==TRUE&&tabular.output.style=='plain') {
which, in the case of granovagg.1w might look like
PrintLinearModelSummary<-function(owp) {
if (print.table==TRUE&&tabular.output.style=='plain') {
if (length(levels(owp$data$group)) ==2) {
PrintTtest(owp$data[, c("score", "group")])
}
else {
message("\nBelow is a linear model summary of your input data")
print(owp$model.summary)
}
}
}
The text was updated successfully, but these errors were encountered:
Note also that if we continue to use message() in many of the print functions means folks will still have to manually hide messages in r code chunks, using the message=FALSE option
granovagg.1w, granovagg.ds, and granovagg.cont all print tabular output after being called. And they kind of force it.
That forcing sucks when working with RMarkdown, because within code chunks you'll get output (designed for interactive R sessions, not publication) that still forcibly prints:
All of the output offset by
##
is the forced printed output. And, yes, it's possible to suppress that output in an RMarkdown code chunk using suppression options, particularlyresults='hide'
:My preferred solution
We add a parameter (hooray!) or two to each function that allows the following:
TRUE
, so existing users don't see any difference.xtable
output. And, this option should default toplain
, again so existing users don't see any difference.The idea is that if you're using an RMarkdown document, you know what you're doing, and you'd request (if required) xtable-formatted output, or none at all.
On the development side, what we'll need to do, I think, is add guard checks to the functions that print:
which, in the case of
granovagg.1w
might look likeThe text was updated successfully, but these errors were encountered: