-
-
Notifications
You must be signed in to change notification settings - Fork 68
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
Colours for text reports? #7
Comments
This package looks very promising! I was thinking about how to make report more integrated with the RMarkdown. The current missing things for me in report are that there are not many options to change styling; and therefore, there are less RMarkdown inlining possibilities. An API suggestion and an expected result: library(tidyverse)
library(report)
iris %>%
with(., cor.test(Sepal.Length, Petal.Length)) %>%
report() %>%
report_style(
rename_values(
Parameter1 = `Sepal Length`,
Parameter2 = `Sepal Width`
),
text_bold(
value = "Parameter1"
),
text_bold(
value = "Parameter2"
)
text_italic(
value = "r"
),
text_italic(
value = "p"
)
) %>%
to_fulltext()
#> The Pearson's product-moment correlation between **Sepal Length** and
#> **Petal Length** is positive, significant and large (*r = 0.87*, *p < .001*). This kind of pipe chaining is implemented in a very well manner in rstudio/gt. Also, referring to your initial message, I'd suggest doing modifications in the object returned by |
@strboul Thanks for that suggestion! >e will start looking into it once an initial version of report in on CRAN. We might ping you then to seek your opinion |
The |
Dr. Strengejacke strongly recommends the
|
As the text (especially the fulltext) can become a bit lengthy (for instance in the case of Bayesian models), I am wondering about the possibility of adding some "contrast" to the text, by colouring some of the values using the same colour code as in the table. It would help to identify key parts of the text.
One way to achieve is to run a smart regex (🤢) over the text to find key elements, e.g. where "beta = X,", "Median = X" etc. However, this doesn't seem straightforward 😕
The text was updated successfully, but these errors were encountered: