How to hide the frame progress message output of gganimate in xaringan?

```{r message=FALSE, warning=FALSE}
p <- ggplot(airquality, aes(Day, Temp, group = Month, color = factor(Month))) +
  geom_point() + geom_line() + scale_color_viridis_d() +
  labs(x = "Day of Month", y = "Temperature") +
  theme(legend.position = "top")
p + transition_reveal(Day)

It outputs
Frame 1 (1%)
Frame 2 (2%)
Frame 3 (3%)
Frame 4 (4%)
Frame 5 (5%)
Frame 6 (6%)
Frame 7 (7%)
Frame 8 (8%)
Frame 9 (9%)
Frame 10 (10%)
Frame 11 (11%)
Frame 12 (12%)
Frame 13 (13%)

I want to hide those message and show the animation.

1 Like

I believe those message comes from the gifski renderer and looking at the code, progress is activated in interactive() session.

There does not seem to be a way to deactivate the progress with this renderer.

One solution would be to render your document in a non interactive session. When I click on the knit button in RStudio, it renders in its own session and I don't see any progress in the resulting html.

Also, about the option, as the progress is printed without using message or warning, the knitr option are not useful I think.

Another solution maybe changing the renderer in gganimate. magick instead of giski ?

Hope it helps.

1 Like

Thanks. It seems because I use the Infinite Moon Reader addin when I'm writing.

Just clicked knit and it works!


This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.