Learn R Programming

itsadug (version 2.0)

start_event: Determine the starting point for each time series.

Description

Determine the starting point for each time series.

Usage

start_event(data, column = "Time", event = "Event", label = "start.event",
  label.event = NULL, order = TRUE)

Arguments

data
A data frame.
column
Test string, name of the column that describes the order withing the time series. Default is "Time".
event
A text string or vector indicating the columns that define the unique time series. Default is "Event".
label
The name of the new column with the start point of each time series. Default is "start.event".
label.event
In case event is not a single column, providing a text string will add a column with this name that defines unique time series. Default is NULL (no new column for time series is created).
order
Logical: whether or not to order each time series. Default is TRUE, maybe set to FALSE with large data frames that are already ordered.

Value

  • Data frame.

See Also

Other functions for model criticism: acf_n_plots, acf_plot, acf_resid, derive_timeseries, resid_gam, start_value_rho

Examples

Run this code
data(simdat)
head(simdat)
test <- start_event(simdat, event=c("Subject", "Trial"), label.event="Event") 
head(test)

Run the code above in your browser using DataLab