Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

RA_long

Relative Amplitude for the Whole Datset


Description

This function calcualte relative amplitude, a nonparametric metric of circadian rhtymicity. This function is a whole dataset wrapper for RA.

Usage

RA_long(count.data, window = 1, method = c("average", "sum"))

Arguments

count.data

data.frame of dimension n * (p+2) containing the p dimensional activity data for all n subject days. The first two columns have to be ID and Day. ID can be either character or numeric. Day has to be numeric indicating the sequency of days within each subject.

window

since the caculation of M10 and L5 depends on the dimension of data, we need to include window size as an argument. This function is a whole dataset wrapper for RA.

method

character of "sum" or "average", function used to bin the data

Value

A data.frame with the following 3 columns

ID

ID

Day

Day

RA

RA

Examples

data(example_activity_data)
count1 = example_activity_data$count
ra_all = RA_long(count.data = count1, window = 10, method = "average")

ActCR

Extract Circadian Rhythms Metrics from Actigraphy Data

v0.2.0
GPL-3
Authors
Junrui Di [aut, cre], Vadim zipunnikov [aut]
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.