Description Usage Arguments Value Note Author(s) See Also Examples
View source: R/animatoR-functions-knitr.R
Provides a line to embed a stack of graphic frames
into PDF file
as animated graphics. It is an interface for LaTeX command
\animategraphics
from LaTeX package animate
.
1 2 3 | includeLatex(title = "", file = NA, scale = 0.5, poster = "first",
every = 1, fps = 25, first = "", last = "", vspace = "0pt",
other = "controls")
|
title |
character, obsolete. |
file |
character, the leftmost part of the file name that
is common to all members of the sequence. If |
scale |
numeric, scaling factor, See Note. |
poster |
character or numeric, ['first' | <num> | 'last' | 'none'] Specifies which frame to display and print if the animation is not activated. The first frame is shown by default. Thus 'poster' or 'poster=first' need not be explicitly set. A frame number <num> may as well be given; <num> is zero-based, that is, the first frame has number '0'. See Note. |
every |
numeric. Build animation from every 'every'th frame only. Skipped frames are discarded and not embedded into the document. See Note. |
fps |
numeric, the animation frame rate (frames per second). Assigning values less than zero results in an error. Default is 25. See Note. |
first |
numeric, first frame to use in animation. Special case is default character value "", equivalent to 1. See Note. |
last |
numeric, last frame to use in animation. Special case is default character value "", equivalent to last, unknown frame number. See Note. |
vspace |
character, vertical space (LaTeX style) for graph positioning. Default is "0pt", no additional space. |
other |
character, other parameters separated by coma and
passed to LaTeX package |
prints and invisibly returns the
LaTeX \animategraphics
command.
Arguments (except title
and
vspace
) are used to communicate
with LaTeX package animate.
For details see documentation for the LaTeX package
animate.
Be aware that this is not the same as R package
animation
.
When used with Sweave or knitr, the argument file
need not to be set and will be conveniently constructed from the
graphical prefix and chunk label.
Argument vspace
can be useful for raising the
animation image on slides (e.g. beamer
).
Andrej Blejec andrej.blejec@nib.si
animator
,
LaTeX package animate
(https://www.ctan.org/pkg/animate),
R package animation
(https://cran.r-project.org/web/packages/animation).
1 2 3 4 5 6 7 8 9 | ## Not run:
includeLatex("Test animation")
includeLatex("Test animation",scale=0.5,poster="last",other="loop")
# To include from specific file with stacked frames ( e. g. 0 .. 99 )
# Useful to include animations that were prepared before and can
# be reused in another file
includeLatex(file="./figs/PreparedBefore",first=10,last=50)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.