plotTraj: Plot individual time series

Description Usage Arguments Value Examples

View source: R/plotTraj.R

Description

Plot individual time series

Usage

1
2
3
4
5
6
plotTraj(dt.arg, x.arg, y.arg, group.arg, facet.arg = NULL,
  summary.arg = c("none", "mean", "meanCInorm", "meanCIboot"),
  facet.ncol.arg = 2, line.col.arg = NULL, xlab.arg = "Time",
  ylab.arg = "Fl. int.", plotlab.arg = "", dt.stim.arg = NULL,
  stim.x.arg, stim.y.arg, maxrt.arg = 60, xaxisbreaks.arg = 10,
  xlim.arg = NULL, ylim.arg = NULL)

Arguments

dt.arg

Data table in long format

x.arg

String with column name of x-axis data

y.arg

String with column name of y-axis data

group.arg

String with column name of the grouping variable for trajectories. This is usually a trackID.

facet.arg

String with oclumn name of the variable used for plot facets (optional)

summary.arg

Optional summary stats to plot on top of individual time series. Choose from c('none', 'mean', 'meanCInorm', 'meanCIboot'), to plot no extra stats, the mean, the mean with 95% CI calculated from the normal distribution approximation, the mean with 95% CI calculated via bootstrapping, respectively.

facet.ncol.arg

Number of facetting columns

line.col.arg

String with variable name to use for time series colouring (default NULL)

xlab.arg

String with x-axis label

ylab.arg

String with y-axis label

plotlab.arg

String with plot title

dt.stim.arg

Data table with stimulation curve

stim.x.arg

String with column name of x-axis stimulation data

stim.y.arg

String with column name of y-axis stimulation data

maxrt.arg

Max value of x-axis label

xaxisbreaks.arg

Value of x-axis interval

xlim.arg

Limit of x-axis

ylim.arg

Limit of y-axis

Value

ggplot2 plot object

Examples

1
2
3
4
5
6
7
require(tca)

# generate synthetic time series
dt = genTraj()

# plot each group in a separate facet; add population mean
plotTraj(dt.arg = dt, x.arg = 'Metadata_RealTime', y.arg = 'objNuc_Intensity_MeanIntensity_imErkCor', group.arg = 'TrackLabel', facet.arg = 'Metadata_Site', summary.arg = 'mean')

dmattek/tca-package documentation built on Dec. 10, 2019, 4:10 p.m.