Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

branching.diffusion

Animation of branching random diffusion


Description

This function creates an animation of branching random diffusion (i.e., BM with speciation).

Usage

branching.diffusion(sig2=1, b=0.0023, time.stop=1000, ylim=NULL, 
   smooth=TRUE, pause=0.02, record=NULL, path=NULL, ...)

Arguments

sig2

variance of BM process, σ^2.

b

birthrate for branching process.

time.stop

number of generations to run.

ylim

y limits (for plotting).

smooth

no longer used.

pause

pause (in s) between generations.

record

filename for video file output (no video if NULL).

path

full path to file for video rendering. (By default branching.diffusion will look for the executable ffmpeg.exe in the directory C:/Program Files/ffmpeg/bin, even though this will not make sense on non-Windows machines.)

...

optional arguments.

Value

An animated plot and (optionally) a recorded video file. For animation to be recorded to file, the function requires the package animation as well as a video renderer.

Author(s)

References

Revell, L. J. (2012) phytools: An R package for phylogenetic comparative biology (and other things). Methods Ecol. Evol., 3, 217-223.

See Also


phytools

Phylogenetic Tools for Comparative Biology (and Other Things)

v0.7-70
GPL (>= 2)
Authors
Liam J. Revell
Initial release
2020-9-19

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.