nCovars: nCovars - Number of covariates

View source: R/nCovars.R

nCovarsR 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


tmcd82070/Rdistance documentation built on April 13, 2025, 1:38 p.m.