targetdistanceGIF: Morris water maze distance to target GIF

View source: R/targetdistanceGIF.R

targetdistanceGIFR Documentation

Morris water maze distance to target GIF

Description

The targetdistanceGIF function creates GIF showing the distance to target over time.

Usage

targetdistanceGIF(
  data,
  id,
  day,
  trial,
  centerx,
  centery,
  radius = 75,
  platformx,
  platformy,
  platformradius = 7.5,
  target_colour = "#CDB99C",
  target_linetype = "solid",
  target_line_colour = "black",
  target_alpha = 0.5,
  target_point_colour = "black",
  show_time = FALSE,
  plot_original_target = FALSE,
  original_platformx = NULL,
  original_platformy = NULL,
  original_target_colour = "lightblue",
  original_target_linetype = "dashed",
  original_target_line_colour = "black",
  original_target_alpha = 0.5,
  original_target_point_colour = "black",
  loop = FALSE,
  width = 480,
  height = 480,
  fps = 10,
  duration = 10,
  theme_settings = NULL,
  title = NA
)

Arguments

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 = "#CDB99C"

target_linetype

Linetype. Default = "solid"

target_line_colour

Colour of the line. Default = "black"

target_alpha

Alpha of the area. Default = 0.5

target_point_colour

Colour of the point. Default = "black"

show_time

Shows trial time (s) as subtitle (ggplot). Default = FALSE

plot_original_target

Plots the distance to the original target (e.g. for reversal trials). Default = FALSE

original_platformx

x coordinate of the center of the original platform (cm). Ignored if plot_original_target = FALSE

original_platformy

y coordinate of the center of the original platform (cm). Ignored if plot_original_target = FALSE

original_target_colour

Colour of the plotted area. Ignored if plot_original_target = FALSE. Default = "lightblue"

original_target_linetype

Linetype. Ignored if plot_original_target = FALSE. Default = "dashed"

original_target_line_colour

Colour of the line. Ignored if plot_original_target = FALSE. Default = "black"

original_target_alpha

Alpha of the area. Ignored if plot_original_target = FALSE. Default = 0.5

original_target_point_colour

Colour of the point. Ignored if plot_original_target = FALSE. Default = "black"

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

theme_settings

Optional parameter that passes list of arguments to ggplot2's theme() function.

title

Add title to GIF. Default = NA


Thonnard/VisualMWM documentation built on June 29, 2023, 11:18 a.m.