obs_length: Retrieve number of observations

Description Usage Arguments Details Value Examples

View source: R/aux_funs.R

Description

Given a matrix of observations or residuals, retrieve the number of sample observations.

Usage

1

Arguments

mat

A (K x N) matrix, with K being the number of variables and N the sample size.

Details

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

Value

An integer scalar. The sample size N.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
K <- 4
N <- 1E3

obs_length(matrix(0, K, N)) == N

## Not run: 

obs_length(1:K)

## End(Not run)

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