Creates an arcosTS object from time series data in long format stored in a `data.table`. Assigns relevant column names and data parameters.

arcosTS(
  dt,
  colPos = "x",
  colFrame = "f",
  colIDobj = "id",
  colIDcoll = NULL,
  colMeas = NULL,
  colMeasResc = NULL,
  colMeasBin = NULL,
  colBootIter = NULL,
  colRT = NULL,
  interVal = 1L,
  interType = c("fixed"),
  fromBin = FALSE,
  fromColl = FALSE,
  fromBoot = FALSE
)

Arguments

dt

a data.table with time series in the long format.

colPos

a vector, names of positional columns; default "x".

colFrame

a string, column name with frame numbers; default "f".

colIDobj

a string, column name with object IDs; default "id".

colIDcoll

a string, column name with IDs of collective events; default NULL.

colMeas

a string, column name of the measurement; default NULL.

colMeasResc

a string, column name of the rescaled measurement; default NULL.

colMeasBin

a string, column name of the binarised measurement; default NULL.

colBootIter

a string, column name with bootstrap iterations; default NULL.

colRT

a string, column name with real time; default NULL (currently unused).

interVal

a numeric with the interval length (currently unused).

interType

a string to designate whether the time series has fixed or variable intervals; possible values fixed or var (currently unused).

fromBin

logical, whether the output has been passed by binarisation, relevant for plotting of binarised activity; default FALSE.

fromColl

logical, whether the output comes from collective event identification, relevant for plotting of collective events; default FALSE.

fromBoot

logical, whether the output comes from bootstrapping, relevant for calculating stats of collective events; default FALSE.

Value

an arcosTS object.

Examples

library(ARCOS)
library(data.table)
dts = arcosTS(dt = data.table(frame = c(1, 1, 2, 2, 2, 3, 3, 3, 3, 4, 4, 4, 5, 5),
                              id = c(1, 2, 1, 2, 3, 1, 2, 3, 4, 1, 2, 4, 1, 4),
                              x = c(1, 3, 1.2, 2.5, 3.5, 0.9, 2.6, 2.9, 3.2, 1.1, 2.8, 3.1, 1, 3)),
              colFrame = "frame",
              colIDobj = "id",
              colPos = "x")