indActogramWake: Generate actogram for "wake" data for individual fly

Description Usage Arguments Value Examples

View source: R/indActogramWake.R

Description

This function allows users to generate individual actograms for "wake" data. Input for this function must be an output from the trimData() function. The output of this function is a plotly object. In a particular bin, sleep is calculated as the total minutes of inactivity equal to or greater than the defined threshold (sleep.def; typically, 5-minutes). Wake is defined as the total time spent by the fly not sleeping. See also wakeData().

Usage

1
2
3
4
5
6
7
8
indActogramWake(
  data,
  sleep.def = c(5),
  bin = 30,
  t.cycle = 24,
  ind = 1,
  key.wake = 1
)

Arguments

data

Input data file. The input for this function must be the output of the function trimData(). See ??trimData().

sleep.def

Definition of sleep. Traditionally, a single bout of sleep is defined as any duration of inactivity that is equal to or greater than 5-minutes. However, sometimes it may be of interest to examine longer bouts of sleep; sleep.def allows users to change the definition of sleep. This defaults to 5.

bin

Intervals in which data are saved (in minutes). This defaults to 30. The value of bin cannot be lower than that of sleep.def.

t.cycle

Define the period of the environmental cycle or a single day in hours. This defaults to 24.

ind

The channel number (or individual) whose actogram must be plotted.

key.wake

Key for reactive input tables in the shiny app.

Value

A plotly htmlwidget with the actogram (wake data) of a user defined fly.

Examples

1
2
3
4
5
6
## Not run: 
td <- trimData(data = df, start.date = "19 Dec 20", start.time = "21:00",
n.days = 10, bin = 1, t.cycle = 24)
ind.actogram.wake <- indActogramWake(data = td, ind = 7)

## End(Not run)

phase documentation built on Aug. 17, 2021, 1:06 a.m.

Related to indActogramWake in phase...