Make observation matrix for time series
ngme_ts_make_A(loc, replicate = NULL, range = c(min(loc), max(loc)))
Arguments
- loc
integers (after sorting, no gaps > 1)
- replicate
indicating replicate measure at same location
- range
range for the mesh
by default range=(min(loc), max(loc))
Value
A matrix (length(loc) * length(unique(loc)))
Examples
ngme_ts_make_A(c(1, 2, 2), replicate = c(1, 1, 2))
#> 3 x 4 sparse Matrix of class "dgCMatrix"
#>
#> [1,] 1 . . .
#> [2,] . 1 . .
#> [3,] . . . 1
ngme_ts_make_A(c(1, 2, 2), range = c(1, 5))
#> 3 x 5 sparse Matrix of class "dgCMatrix"
#>
#> [1,] 1 . . . .
#> [2,] . 1 . . .
#> [3,] . 1 . . .