mm_ArrayData: Array Data

View source: R/align.R

mm_ArrayDataR Documentation

Array Data

Description

Construct a ragged array (containing missing data) of a specified length (up/down sampling individuals to fit).

Usage

mm_ArrayData(
  ObsIDs,
  ObsDays,
  ObsValue,
  ObsMid,
  StartDay = 1,
  EndDay = NULL,
  ScaleTo,
  ScaleToMid = NULL
)

Arguments

ObsIDs

A vector that contains indiviaul IDs repeated for muliple days of collection.

ObsDays

A vector that contains information on time, IE Day 1, Day 2, Day 3. Note: this vector should include integers, continuous data might produce unintended results.

ObsValue

A vector containing the variable sampled.

ObsMid

A vector containng the midpoint day for each individual. Note: ObsMid must have the same number of observations as unique Individuals.

StartDay

Default is starting at ObsDay 1, can specify other values to subsample.

EndDay

If NULL (default), the highest ObsDay is used for each individual.

ScaleTo

Integer. Number of days to up/down sample observations to using mm_GetInterval.

ScaleToMid

If NULL (default) 0 will be centered using mm_interval.

Value

Returns a 3D array of data to be analyzed with individuals in the 3rd dimension.


ehrlichd/moRphomenses documentation built on Aug. 6, 2022, 2:32 a.m.