eTrim {expandFunctions}R Documentation

Remove padded rows from matrix X

Description

Remove padded rows from matrix X

Usage

eTrim(X, pad = NA)

Arguments

X

R object coercible to matrix

pad

Value representing padded elements. By default it is NA, but could be any value.

Value

A matrix.

Examples

n <- 10
x <- rnorm(n)    # x vector
X <- eLag(x,0:1) # X matrix
t <- 1:n         # time vector
T <- eLag(t,0:1) # time matrix; the column corresponding
                 # to 0 is the time for each row,
                 # even after trimming
matplot(X,type="l",lty=1)
X <- eTrim(X)
T <- eTrim(T)
matplot(x=T[,1],y=X,type="l",lty=1,
  xlab="Time")

[Package expandFunctions version 0.1.0 Index]