var_length: Retrieve number of variables

Description Usage Arguments Details Value Examples

View source: R/aux_funs.R

Description

Given a matrix of observations, residuals or slope coefficients, retrieve the number of variables K.

Usage

1

Arguments

mat

(K x M) matrix, with K being the number of variables.

Details

At the moment, this function is just an aptly / intentionally named wrapper of nrow(mat).

Value

An integer scalar. The number of variables K.

Examples

1
2
3
4
5
6
7
8
9
p <- 3
K <- 4
var_length(matrix(0, K, K * p)) == K

## Not run: 

var_length(1:K)

## End(Not run)

nielsaka/zeitreihe documentation built on March 17, 2020, 8:38 p.m.