-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathacdc_animate_record.Rd
70 lines (61 loc) · 3.32 KB
/
acdc_animate_record.Rd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/acdc_analyse_record.R
\name{acdc_animate_record}
\alias{acdc_animate_record}
\title{Create a html animation of the AC/DC algorithm(s)}
\usage{
acdc_animate_record(
expr_param,
dir = NULL,
html_name = "ACDC_algorithm_demo.html",
image_name = "ACDC",
html_title = "Demonstration of the ACDC Algorithm",
html_description = "",
navigator = FALSE,
ani_height = 1000,
ani_width = 1000,
ani_res = 150,
interval = 0.1,
verbose = FALSE,
...
)
}
\arguments{
\item{expr_param}{A named list of arguments, passed to \code{\link[flapper]{acdc_plot_record}}, to create plots.}
\item{dir}{(optional) A string that defines the directory in which to save files. If unsupplied, if available, \code{dir} is taken from \code{html_name} using \code{\link[base]{dirname}}.}
\item{html_name}{A string that defines the name of the html file (see `htmlfile' argument in \code{\link[animation]{saveHTML}}).}
\item{image_name}{A string that defines the names of the individual .png files creates (see `img.name' argument in \code{\link[animation]{saveHTML}}).}
\item{html_title, html_description}{Character strings that provide a title and a description that are displayed within the html animation (see `title' and `description' arguments in \code{\link[animation]{saveHTML}}).}
\item{navigator}{A logical variable that defines whether or not to add a navigator panel to the animation (see `navigator' argument in \code{\link[animation]{saveHTML}}).}
\item{ani_height, ani_width, ani_res}{Numbers that define the size and the resolution of the animation (see `ani.height' `ani.width' and `ani.res' arguments in \code{\link[animation]{ani.options}}).}
\item{interval}{A number that defines the time interval between sequential frames (see `interval' argument in \code{\link[animation]{ani.options}}).}
\item{verbose}{A logical or character variable that defines whether or not, or what, to write as a footer to the html animation (see `verbose' argument in \code{\link[animation]{ani.options}}).}
\item{...}{Additional arguments passed to \code{\link[animation]{ani.options}}.}
}
\value{
The function produces an animation in .html format in the specified directory. A folder named `images' is also produced which contains the images for each time step. The `css' and `js' folders are also produced by \code{\link[animation]{saveHTML}} which creates the animation.
}
\description{
This function is a simple wrapper for \code{\link[flapper]{acdc_plot_record}} and \code{\link[animation]{saveHTML}} which creates an animation of the AC* algorithm(s) over time. To implement this function, a named list of arguments for \code{\link[flapper]{acdc_plot_record}}, which creates the plots, must be supplied. This is embedded within \code{\link[animation]{saveHTML}}, which creates a folder in the specified directory named `images' that contains a .png file for each time step and an animation as a .html file.
}
\details{
This function requires the \code{\link[animation]{animation}} package.
}
\examples{
dir_current <- getwd()
setwd(tempdir())
acdc_record <- acdc_simplify(dat_acdc)
acdc_animate_record(
expr_param =
list(
record = acdc_record,
add_coastline = list(x = dat_coast, col = "darkgreen"),
plot = 1:5,
fix_zlim = FALSE
)
)
setwd(dir_current)
}
\author{
Edward Lavender
}