Make 2-D array (Matrix for JAGS)

make_mat(df.in, row = "site.ind", col = "year.ind", val, replace.na = FALSE)

Arguments

df.in

Data frame

row

Variable in df containing target row names

col

Variable in df containing target column names

val

Variable containing the target cell contents

replace.na

Whether to replace NA values with zero.