View source: R/calcErrorBars.R
calcErrorBars | R Documentation |
Calculate error bars for given measurement column in data_dt.
calcErrorBars(
data_dt,
kind_v = "MSEM",
col_v = "value",
groupCol_v,
fCol_v = NA,
fVal_v = NA
)
data_dt |
input data.table (most likely melted and ready for ggplot) |
kind_v |
which bars to make. MSEM = mean +/- SEM; MSD = mean +/- sd; MQ = median and lower/upper quartiles |
col_v |
which column in data_dt is the measurement that is used. |
groupCol_v |
which column to group calculations by. Treatment is common |
fCol_v |
which column to further group calcs by. Used if faceting the output. |
fVal_v |
values of fCol_v to group by. |
Will calculate center and upper/lower bounds of disribution by one of two methods and add columns to data_dt labeled "Lower", "Middle", and "Upper". Will group calculated error bars by a grouping column and can further subdivide by a second column.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.