nCovars function

nCovars - Number of covariates

nCovars - Number of covariates

Return number of covariates in a distance model

nCovars(X)

Arguments

  • X: The X matrix of covariates, or a vector.

Returns

An integer scalar

do not export

Details

The reason this routine is needed is that sometimes we pass one row of covariates to a likelihood function. If so, it may come in as a normal vector, not a matrix. If a normal vector, ncol(X) does not work.

  • Maintainer: Trent McDonald
  • License: GNU General Public License
  • Last published: 2025-04-10