Learn R Programming

hierarchicalDS (version 3.0)

stack_data: function to stack data (going from three dimensional array to a two dimensional array including only "existing" animals

Description

function to stack data (going from three dimensional array to a two dimensional array including only "existing" animals

Usage

stack_data(Data, Obs.transect, n.transects, stacked.names, factor.ind)

Arguments

Data

three-d dataset

Obs.transect

current number of observations of animals in each transect (vector)

n.transects

number of transects

stacked.names

column names for new stacked dataset

factor.ind

a vector of indicator variables (1 = factor/categorical variable, 0 = continuous variable)

Value

a stacked dataset