plotCombTraj: Plot Cluster-Specific Mean or Median Trajectories provided by...

View source: R/plotCombTraj.R

plotCombTrajR Documentation

Plot Cluster-Specific Mean or Median Trajectories provided by a traj object

Description

Plot cluster-specific mean or median trajectories.

Usage

plotCombTraj(x, stat.type = "mean", colored = FALSE, ...)

Arguments

x

traj object.

stat.type

Choice between "mean" or "median". The mean or the median calculated at each time point for a cluster-specific set of trajectories will be plotted. Defaults to "mean."

colored

Boolean in dictating if the plot should use colors. If not, the trajectory lines will be distinctively patterned. Defaults to FALSE for patterns.

...

Any extra parameter used by the plot function.

Details

The function plots the mean or the median cluster-specific trajectory, calculated at each time point. A legend is generated in the top left corner of the plot. Other plotting parameter(s) can be added to the function with the use of ....

Author(s)

Marie-Pierre Sylvestre, Dan Vatnik

marie-pierre.sylvestre@umontreal.ca

See Also

mean median

Examples

## Not run: 
# Setup data 
data = example.data$data

# Run step1measures, step2factors and step3clusters with a predetermined number of clusters
s1 = step1measures(data, ID=TRUE)
s2 = step2factors(s1)
s3.4clusters = step3clusters(s2, nclust = 4)

# Plot mean combination trajectories
plotCombTraj(s3.4clusters)

## End(Not run)


traj documentation built on April 14, 2023, 12:39 a.m.