velocityGIF | R Documentation |
The velocityGIF function creates GIF showing the velocity during a trial over time.
velocityGIF(
data,
id,
day,
trial,
centerx,
centery,
radius = 75,
platformx,
platformy,
platformradius = 7.5,
target_colour = "#008000",
target_linetype = "solid",
target_line_colour = NA,
target_alpha = 0.5,
target_point_colour = "#008000",
removeVelocityOutliers = TRUE,
SwimspeedLimit = 50,
loop = FALSE,
width = 480,
height = 480,
fps = 10,
duration = 10,
show_time = FALSE,
theme_settings = NULL,
title = NA
)
data |
Data set containing at least following columns: "Time", "x", "y", "Animal", "Day", "Trial". "x" and "y" represent the coordinates (position) of the animal at a certain timepoint ("Time") during the trial. |
id |
ID of the animal |
day |
day number |
trial |
trial number |
centerx |
x coordinate of the center of the morris water maze (cm) |
centery |
y coordinate of the center of the morris water maze (cl) |
radius |
radius of the morris water maze (cm), default = 75 |
platformx |
x coordinate of the center of the platform (cm) |
platformy |
y coordinate of the center of the platform (cm) |
platformradius |
radius of the platform (cm), default = 7.5 |
target_colour |
Colour of the plotted area. Default = "#008000" |
target_linetype |
Linetype. Default = "solid" |
target_line_colour |
Colour of the line. Default = NA |
target_alpha |
Alpha of the area. Default = 0.5 |
target_point_colour |
Colour of the point. Default = "#008000" |
removeVelocityOutliers |
Remove velocity outiers (e.g. due to tracking issues). Default = TRUE |
SwimspeedLimit |
Maximum speed (cm/s). Data points above this are removed if removeVelocityOutliers = TRUE. Default = 50 |
loop |
Loop the animation, default = FALSE |
width |
Width of the animation (px), default = 480 |
height |
Height of the animation (px), default = 480 |
fps |
Frames per second of the animation. Minimum 100 frames per GIF. default = 10 |
duration |
Duration of the animation (s), default = 10 |
show_time |
Shows trial time (s) as subtitle (ggplot). Default = FALSE |
theme_settings |
Optional parameter that passes list of arguments to ggplot2's theme() function. |
title |
Add title to GIF. Default = NA |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.