Retrieving Series Names in the "mts" Object
Do you want colnames() :
> colnames(z) [1] "x1" "x2" "x3"
This is because z is actually a matrix with additional attributes, and the matrices do not have names , but they have colnames .
Assigning / changing series names in the "mts" object
To assign colnames after the fact or change them, use the replace function 'colnames<-'
> colnames(z) <- paste0("a", 1:3) > colnames(z) [1] "a1" "a2" "a3"
Retrieving a specific series from the "mts" object
As for extracting columns, [ works great for objects "ts" and "mts" . eg:
> z[,1] Jan Feb Mar Apr May 1961 0.81800833 -0.30852155 0.05915071 0.14937058 0.67734362 1962 1.12993606 -0.81176485 -0.51903387 1.12527537 -0.34377553 1963 1.30469813 0.32486340 0.01029512 -1.13631688 -1.22013150 1964 0.72449621 -0.88704234 0.78834391 -0.92956537 -0.31584252 1965 0.24610412 0.97980266 0.17136276 2.45216318 0.15846038 1966 -0.48891587 -0.62820331 0.33190472 2.14094813 1.32389152 1967 0.49120472 -0.10149521 -0.39070688 -0.78743955 -1.20563040 1968 -0.70749150 0.52333087 -0.51991721 0.02037504 -0.59848254 1969 -0.80156968 -1.38172513 0.09400527 0.66966443 ....
Feelings problems OP
For the last bit, I'm not sure what you hope to get. The "ts" or "mts" object is a regular time series, and extracting the signal[, "d"] bits results in a vector, not a time series.
> signal[signal[,2] == 1, 1] [1] 761 1104 810 653 522 956 593
There is no time index because it is no longer a "ts" object. If you want to do this, the zoo package is likely to be what you want. Here is an example where we convert a zoo object using as.zoo()
require(zoo) sz <- as.zoo(signal)
Then we can extract the observations we need (names that are a useful indicator of the time index)
> sz[sz[, "i"] == 1, "d"] 1975(12) 1976(2) 1976(12) 1977(12) 1978(1) 1978(12) 1979(1) 761 1104 810 653 522 956 593
and then a similar call to a subset, but using index() to return the time index of the entire zoo object, and then select the bits we need
> index(sz)[sz[, "i"] == 1] [1] 1975.917 1976.083 1976.917 1977.917 1978.000 1978.917 [7] 1979.000