Re: [R] tail.matrix returns matrix, while tail.mts return vector

2010-09-05 Thread mat
Thanks Ista! Indeed this is the workaround I had found, but not very practical as it fails on univariate series, so you should know before which class is the object... I feel a head.mts would make sense, or did I misunderstand something? Thanks! Matthieu Le 04. 09. 10 16:09, Ista Zahn a

[R] tail.matrix returns matrix, while tail.mts return vector

2010-09-04 Thread mat
Hi I have a few problems with tail/head when applied to multiple time series. I'm not sure as whether I did not understand the function or whether it correspond to an unexpected behavior. When head(a,n) is applied on data.frame or matrix, it returns a data-frame or matrix with first n obs

Re: [R] tail.matrix returns matrix, while tail.mts return vector

2010-09-04 Thread Ista Zahn
Hi Mat, You might be able to use the matrix method to get what you want. head.matrix(EuStockMarkets) -Ista On Sat, Sep 4, 2010 at 1:15 PM, mat matthieu.stig...@gmail.com wrote: Hi I have a few problems with tail/head when applied to multiple time series. I'm not sure as whether I did not