Learn R Programming

traj (version 1.2)

wrapperTraj: Wrapper Function to Perform Trajectory Analysis

Description

Run three steps of trajectory analysis with default parameters.

Usage

wrapperTraj(Data, Time, ID = FALSE)

Value

The result is a traj object. Details can be found in the 'Value' section of step3clusters.

Arguments

Data

Data frame containing trajectory data. Each line should contain sequential observations. See details.

Time

Data frame containing the time of each observation in the Data table.See details.

ID

Logical. Set to FALSE if the first column of Data corresponds to an ID variable. Defaults to FALSE

Author

Dan Vatnik, Marie-Pierre Sylvestre
dan.vatnik@gmail.com

Details

The function runs the full three step trajectory analysis and returns a traj object. It will execute step1measures, step2factors and step3clusters sequentially with their default parameters. The result of step3clusters will be returned. Details regarding the data and the time arguments are found in the 'Details' section of step1measures.

Examples

Run this code
# Setup data and time
data = example.data$data
time = example.data$time

# Run clustering wrapper function
wt = wrapperTraj(data, time, ID = TRUE)

# Display and plot "traj" object
wt
summary(wt)

plot(wt)

Run the code above in your browser using DataLab