binData: Bin activity data to desired intervals

Description Usage Arguments Value Examples

View source: R/binData.R

Description

Allows users to bin data sets into intervals of time different from the data collection interval. The input for this function must be the output of the trimData() function. The output of this function is a data frame. The first column of which stores Zeitgeber Time values (assuming that the start.time in the trimData() function was set at Zeitgeber Time 00). All subsequent columns have binned activity data for each fly.

Usage

1
binData(data, input.bin = 1, output.bin = 30, t.cycle = 24)

Arguments

data

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

input.bin

Define the bin size (in minutes) in the input file. This defaults to 1.

output.bin

Define the desired output bin size (in minutes). This defaults to 30.

t.cycle

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

Value

A matrix array with 33 columns (number of rows depends on number of days, and the input parameters of this function):

ZT

ZT values starting at ZT00 (time at which light turns ON).

I1:I32

Columns of binned locomotor activity data (each column represents a single fly).

Examples

1
2
3
4
td <- trimData(data = df, start.date = "19 Dec 20", start.time = "21:00",
n.days = 10, bin = 1, t.cycle = 24)
bd <- binData(data = td)
bd <- binData(data = td, input.bin = 1, output.bin = 15, t.cycle = 24)

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

Related to binData in phase...