When using the tis time series package (v1.9), I cannot select or alter a subset of a time series when the time series is created from a matrix and the matrix contains NA values.

Example:

x<-tis(t(c(1:10,NA)), start=c(2000,1), freq=12)
x[x>0]<-0

The second line yields "Error in if (any(i > nrow(x))) { : missing value where TRUE/FALSE needed"

However, both of the following work fine:

x<-tis(t(c(1:10)), start=c(2000,1), freq=12) # Does not contain NA
x[x>0]<-0
x<-tis(c(1:10,NA), start=c(2000,1), freq=12) # Contains NA, but input is not a matrix
x[x>0]<-0

Can someone suggest a solution? Is this a bug? Thanks.

Abiel


This communication is for informational purposes only. I...{{dropped:30}}

