Description Usage Arguments Value Examples
View source: R/perc_baseline.R
'perc_baseline' calculates the percent change from a user-specified baseline
1 | perc_baseline(xvals, base.val)
|
xvals |
vector of numbers |
base.val |
the baseline value to be centered by |
a vector with values transformed to percent baseline
1 2 3 4 5 6 7 8 9 10 11 12 13 | ### Format data frame
# Format data
df.new <- format_data(GCaMP)
# Split data
basevals <- df.new$Trial1[df.new$Time <= 0]
eventvals <- df.new$Trial1[df.new$Time > 0]
# Find baseline (pre-epoc) values
base.mean <- mean(basevals)
# Compute values
perc_baseline(x = eventvals, base.val = base.mean)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.