barGIF: Bar chart for percentage of quadrant time

Description Usage Arguments

View source: R/barGIF.R

Description

The barGIF function creates a GIF showing the percentage of time spent per quadrant for a specific trial of one animal.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
barGIF(
  data,
  id,
  day,
  trial,
  centerx,
  centery,
  radius = 75,
  platformx,
  platformy,
  platformradius = 7.5,
  bar_colours = c("#F8766D", "#7CAE00", "#00BFC4", "#C77CFF"),
  show_time = FALSE,
  loop = FALSE,
  width = 480,
  height = 480,
  fps = 10,
  duration = 10,
  frames = 100,
  time_bins = 50,
  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

bar_colours

Colours of the four bars. Default = c("#F8766D","#7CAE00", "#00BFC4", "#C77CFF")

show_time

Show time-bins (s) as subtitle (ggplot). Default = FALSE

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, default = 10

duration

Duration of the animation(s), default = 10

frames

Number of frames in the animation, default = 100

time_bins

Number of time-bins in the animation, default = 50

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 Aug. 22, 2020, 4:41 p.m.