Creating animation in R Notebooks

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

Creating animation in R Notebooks

reichmaj
r-help forum

 

Has anyone created an animations within a R-Notebook. I'm trying to create
an animation within a R -Notebook and while my code works outside of a
notebook (Console) but inside the R-Notebook framework I only get a list of
the  *.png files. Any suggestions?

 

path.animate.plot <- mymap.paths +

  transition_reveal(along = date) +

  labs(title = 'Date: {frame_along}')  # Add a label on top to say what date
each frame is

 

animate(path.animate.plot,

        fps = 3, # frames per second

        nframes = 200) # default is 100 frames

 

  [1] "./gganim_plot0001.png" "./gganim_plot0002.png"
"./gganim_plot0003.png" "./gganim_plot0004.png"

  [5] "./gganim_plot0005.png" "./gganim_plot0006.png"
"./gganim_plot0007.png" "./gganim_plot0008.png"

  [9] "./gganim_plot0009.png" "./gganim_plot0010.png"
"./gganim_plot0011.png" "./gganim_plot0012.png" ..

 

Jeff Reichman


        [[alternative HTML version deleted]]

______________________________________________
[hidden email] mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.
Reply | Threaded
Open this post in threaded view
|

Re: Creating animation in R Notebooks

Bert Gunter-2
Maybe better asked here: https://community.rstudio.com/
as this is largely an RStudio product.

Cheers,
Bert

Bert Gunter

"The trouble with having an open mind is that people keep coming along and
sticking things into it."
-- Opus (aka Berkeley Breathed in his "Bloom County" comic strip )


On Fri, Sep 18, 2020 at 8:27 AM Jeff Reichman <[hidden email]>
wrote:

> r-help forum
>
>
>
> Has anyone created an animations within a R-Notebook. I'm trying to create
> an animation within a R -Notebook and while my code works outside of a
> notebook (Console) but inside the R-Notebook framework I only get a list of
> the  *.png files. Any suggestions?
>
>
>
> path.animate.plot <- mymap.paths +
>
>   transition_reveal(along = date) +
>
>   labs(title = 'Date: {frame_along}')  # Add a label on top to say what
> date
> each frame is
>
>
>
> animate(path.animate.plot,
>
>         fps = 3, # frames per second
>
>         nframes = 200) # default is 100 frames
>
>
>
>   [1] "./gganim_plot0001.png" "./gganim_plot0002.png"
> "./gganim_plot0003.png" "./gganim_plot0004.png"
>
>   [5] "./gganim_plot0005.png" "./gganim_plot0006.png"
> "./gganim_plot0007.png" "./gganim_plot0008.png"
>
>   [9] "./gganim_plot0009.png" "./gganim_plot0010.png"
> "./gganim_plot0011.png" "./gganim_plot0012.png" ..
>
>
>
> Jeff Reichman
>
>
>         [[alternative HTML version deleted]]
>
> ______________________________________________
> [hidden email] mailing list -- To UNSUBSCRIBE and more, see
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide
> http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
>

        [[alternative HTML version deleted]]

______________________________________________
[hidden email] mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.
Reply | Threaded
Open this post in threaded view
|

Re: Creating animation in R Notebooks

David Winsemius
In reply to this post by reichmaj
https://bookdown.org/yihui/rmarkdown-cookbook/animation.html

On 9/18/20 8:26 AM, Jeff Reichman wrote:

> r-help forum
>
>  
>
> Has anyone created an animations within a R-Notebook. I'm trying to create
> an animation within a R -Notebook and while my code works outside of a
> notebook (Console) but inside the R-Notebook framework I only get a list of
> the  *.png files. Any suggestions?
>
>  
>
> path.animate.plot <- mymap.paths +
>
>    transition_reveal(along = date) +
>
>    labs(title = 'Date: {frame_along}')  # Add a label on top to say what date
> each frame is
>
>  
>
> animate(path.animate.plot,
>
>          fps = 3, # frames per second
>
>          nframes = 200) # default is 100 frames
>
>  
>
>    [1] "./gganim_plot0001.png" "./gganim_plot0002.png"
> "./gganim_plot0003.png" "./gganim_plot0004.png"
>
>    [5] "./gganim_plot0005.png" "./gganim_plot0006.png"
> "./gganim_plot0007.png" "./gganim_plot0008.png"
>
>    [9] "./gganim_plot0009.png" "./gganim_plot0010.png"
> "./gganim_plot0011.png" "./gganim_plot0012.png" ..
>
>  
>
> Jeff Reichman
>
>
> [[alternative HTML version deleted]]
>
> ______________________________________________
> [hidden email] mailing list -- To UNSUBSCRIBE and more, see
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.

______________________________________________
[hidden email] mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.
Reply | Threaded
Open this post in threaded view
|

Re: Creating animation in R Notebooks

Jeff Newmiller
In reply to this post by Bert Gunter-2
It is part of a CRAN package rmarkdown, but major contributed packages are indeed outside the scope of this list regardless of where they come from.

Google is as always your friend: https://community.rstudio.com/t/make-an-rstudio-notebook-inline-animation-that-loops-with-gganimate/27489/2

On September 18, 2020 9:55:30 AM PDT, Bert Gunter <[hidden email]> wrote:

>Maybe better asked here: https://community.rstudio.com/
>as this is largely an RStudio product.
>
>Cheers,
>Bert
>
>Bert Gunter
>
>"The trouble with having an open mind is that people keep coming along
>and
>sticking things into it."
>-- Opus (aka Berkeley Breathed in his "Bloom County" comic strip )
>
>
>On Fri, Sep 18, 2020 at 8:27 AM Jeff Reichman <[hidden email]>
>wrote:
>
>> r-help forum
>>
>>
>>
>> Has anyone created an animations within a R-Notebook. I'm trying to
>create
>> an animation within a R -Notebook and while my code works outside of
>a
>> notebook (Console) but inside the R-Notebook framework I only get a
>list of
>> the  *.png files. Any suggestions?
>>
>>
>>
>> path.animate.plot <- mymap.paths +
>>
>>   transition_reveal(along = date) +
>>
>>   labs(title = 'Date: {frame_along}')  # Add a label on top to say
>what
>> date
>> each frame is
>>
>>
>>
>> animate(path.animate.plot,
>>
>>         fps = 3, # frames per second
>>
>>         nframes = 200) # default is 100 frames
>>
>>
>>
>>   [1] "./gganim_plot0001.png" "./gganim_plot0002.png"
>> "./gganim_plot0003.png" "./gganim_plot0004.png"
>>
>>   [5] "./gganim_plot0005.png" "./gganim_plot0006.png"
>> "./gganim_plot0007.png" "./gganim_plot0008.png"
>>
>>   [9] "./gganim_plot0009.png" "./gganim_plot0010.png"
>> "./gganim_plot0011.png" "./gganim_plot0012.png" ..
>>
>>
>>
>> Jeff Reichman
>>
>>
>>         [[alternative HTML version deleted]]
>>
>> ______________________________________________
>> [hidden email] mailing list -- To UNSUBSCRIBE and more, see
>> https://stat.ethz.ch/mailman/listinfo/r-help
>> PLEASE do read the posting guide
>> http://www.R-project.org/posting-guide.html
>> and provide commented, minimal, self-contained, reproducible code.
>>
>
> [[alternative HTML version deleted]]
>
>______________________________________________
>[hidden email] mailing list -- To UNSUBSCRIBE and more, see
>https://stat.ethz.ch/mailman/listinfo/r-help
>PLEASE do read the posting guide
>http://www.R-project.org/posting-guide.html
>and provide commented, minimal, self-contained, reproducible code.

--
Sent from my phone. Please excuse my brevity.

______________________________________________
[hidden email] mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.
Reply | Threaded
Open this post in threaded view
|

Re: Creating animation in R Notebooks

reichmaj
In reply to this post by David Winsemius
David

The reference helped thank you. The "gifski" library corrected the issue

Jeff

-----Original Message-----
From: David Winsemius <[hidden email]>
Sent: Friday, September 18, 2020 1:19 PM
To: [hidden email]; [hidden email]
Subject: Re: [R] Creating animation in R Notebooks

https://bookdown.org/yihui/rmarkdown-cookbook/animation.html

On 9/18/20 8:26 AM, Jeff Reichman wrote:

> r-help forum
>
>  
>
> Has anyone created an animations within a R-Notebook. I'm trying to
> create an animation within a R -Notebook and while my code works
> outside of a notebook (Console) but inside the R-Notebook framework I
> only get a list of the  *.png files. Any suggestions?
>
>  
>
> path.animate.plot <- mymap.paths +
>
>    transition_reveal(along = date) +
>
>    labs(title = 'Date: {frame_along}')  # Add a label on top to say
> what date each frame is
>
>  
>
> animate(path.animate.plot,
>
>          fps = 3, # frames per second
>
>          nframes = 200) # default is 100 frames
>
>  
>
>    [1] "./gganim_plot0001.png" "./gganim_plot0002.png"
> "./gganim_plot0003.png" "./gganim_plot0004.png"
>
>    [5] "./gganim_plot0005.png" "./gganim_plot0006.png"
> "./gganim_plot0007.png" "./gganim_plot0008.png"
>
>    [9] "./gganim_plot0009.png" "./gganim_plot0010.png"
> "./gganim_plot0011.png" "./gganim_plot0012.png" ..
>
>  
>
> Jeff Reichman
>
>
> [[alternative HTML version deleted]]
>
> ______________________________________________
> [hidden email] mailing list -- To UNSUBSCRIBE and more, see
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide
> http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.

______________________________________________
[hidden email] mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.