auc_trials: Calculate area under curve

Description Usage Arguments Value Examples

View source: R/auc_trials.R

Description

'auc_trials' calculates area under curve for multiple trials using trapezoidal integration

Usage

1
auc_trials(dataframe, trials, time.range)

Arguments

dataframe

a fluoR-format dataframe

trials

trial numbers to find AUC for

time.range

range of time to find AUC for

Value

a named vector of trial AUCs

Examples

1
2
3
4
5
6
7
### What is the AUC for the first 2 seconds of post-onset
### for the first 5 trials?
df <- format_data(GCaMP)
trials <- 1:5
time.range <- c(0,2)

auc_trials(dataframe = df, time.range = time.range, trials = trials)

atamalu/fluoR documentation built on Dec. 7, 2020, 4:48 a.m.