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
I want to add a marquee_grob to a rmarkdown document using RStudio, but on its own, not as part of anything bigger. The problem is I don't know how to set the grob to fit around the text. Here is an example:
library(patchwork)
library(marquee)
library(ggplot2)
text <- "
```stan_glm
family: binomial [logit]
formula: switch ~ dist100
observations: 3020
predictors: 2
------
Median MAD_SD
(Intercept) 0.61 0.06
dist100 -0.62 0.10
------
* For help interpreting the printed output see ?print.stanreg
* For info on the priors used see ?prior_summary.stanreg```"
grob <- marquee_grob(text,
force_body_margin = TRUE,
style = modify_style(classic_style(base_size=12), "cb", lineheight=1),
)
g = wrap_elements(panel=grob)
ggsave("a_grob.png", g)
The problem is the text sits at the top of a much deeper frame. How do I trim the frame to fit the text and nothing more?
The text was updated successfully, but these errors were encountered:
I want to add a marquee_grob to a rmarkdown document using RStudio, but on its own, not as part of anything bigger. The problem is I don't know how to set the grob to fit around the text. Here is an example:
The problem is the text sits at the top of a much deeper frame. How do I trim the frame to fit the text and nothing more?
The text was updated successfully, but these errors were encountered: