indPeriodogramAct: Periodogram plot for activity data of individual flies

Description Usage Arguments Value Examples

View source: R/indPeriodogramAct.R

Description

This function generates a periodogram for the activity data of a single fly. Input for this function must be an output from the trimData() function. The output of this function is a plotly object.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
indPeriodogramAct(
  data,
  bin = 1,
  method = "ChiSquare",
  low.per = 16,
  high.per = 32,
  alpha = 0.05,
  time.res = 20,
  ind = 1
)

Arguments

data

Input data file. If the method for analysis is "ChiSquare", then the input for this function must be the output of the function trimData(). See ??trimData(). Otherwise, the input for this function must be the output of the function binData(). See ??binData().

bin

Intervals in which data are sampled (in minutes). This defaults to 1. This must be changed appropriately depending on method of analysis and the input data set.

method

Choose the method for performing time-series analysis. Currently, three methods are implemented for analysis - "ChiSquare", "Autocorrelation", and "LombScargle". This defaults to "ChiSquare".

low.per

Choose the lowest period (in hours) for analysis. This defaults to 16.

high.per

Choose the highest period (in hours) for analysis. This defaults to 32.

alpha

Choose the significance level for periodogram analysis. This defaults to 0.05.

time.res

Resolution of periods (in minutes) to analyse while using the ChiSquare periodogram. For instance, if users wish to scan periods from low.per to high.per in the following manner: 16, 16.5, 17, 17.5, and so on, then time.res must be 30. This defaults to 20.

ind

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

Value

A plotly htmlwidget with the individual periodogram of a user defined fly.

Examples

1
2
3
td <- trimData(data = df, start.date = "19 Dec 20", start.time = "21:00",
n.days = 10, bin = 1, t.cycle = 24)
ind.periodogram.act <- indPeriodogramAct(data = td, ind = 13)

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