center_trials: Centers individual or multiple trials

Description Usage Arguments Value Examples

View source: R/center_trials.R

Description

'center_trials' subtracts summarized data during a user-specified time period from trial values

Usage

1
2
center_trials(Dataframe, Trials, Baseline.times, Baseline.frame = NULL,
  Method = "perc.baseline", Summary.type = "mean")

Arguments

Dataframe

a GCalcium-format data frame or matrix

Trials

a single trial number or vector of trial numbers to center

Baseline.times

range of time from Baseline.frame to compute the baseline value from

Baseline.frame

a GCalcium-format data frame or matrix containing the baseline period. If frame is not specified, Dataframe is automatically used

Method

the type of centering to be used

Summary.type

the type of summary statistic to be centered by

Value

a GCalcium-format data frame with centered values

Examples

1
2
3
4
5
### Format data frame
df.new <- format_data(GCaMP)

### Transform into percent baseline: relative to -3s to -1s before epoc
center_trials(Dataframe = df.new, Trials = c(1, 2, 3), Baseline.times = c(-3, -1))

atamalu/GCalcium documentation built on July 12, 2019, 7:04 p.m.