Description Usage Arguments Value Examples
View source: R/center_trials.R
'center_trials' subtracts summarized data during a user-specified time period from trial values
1 2 | center_trials(Dataframe, Trials, Baseline.times, Baseline.frame = NULL,
Method = "perc.baseline", Summary.type = "mean")
|
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 |
a GCalcium-format data frame with centered values
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))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.