nCovars {Rdistance}R Documentation

nCovars - Number of covariates

Description

Return number of covariates in a distance model

Usage

nCovars(X)

Arguments

X

The X matrix of covariates, or a vector.

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.

Value

An integer scalar

# do not export


[Package Rdistance version 4.0.5 Index]