[Rd] fix() changes the class of mts objects

From: Simone Giannerini <sgiannerini_at_gmail.com>
Date: Wed, 09 May 2007 15:15:23 +0200


Dear all,

it looks like fix() changes the class of mts objects, here is a reproducible example (tested both on WinXP and Linux):

> x <- ts(cbind(1:5,1:5))
> x

Time Series:
Start = 1
End = 5
Frequency = 1
  Series 1 Series 2

1        1        1
2        2        2
3        3        3
4        4        4
5        5        5

> class(x)

[1] "mts" "ts"
> edit(x)
     Series 1 Series 2
[1,]        1        1
[2,]        2        2
[3,]        3        3
[4,]        4        4
[5,]        5        5

> class(x)

[1] "mts" "ts"
> fix(x)
> class(x)

[1] "matrix"
> x
     Series 1 Series 2
[1,]        1        1
[2,]        2        2
[3,]        3        3
[4,]        4        4
[5,]        5        5


> R.version
_ platform i386-pc-mingw32 arch i386 os mingw32 system i386, mingw32 status major 2 minor 5.0 year 2007 month 04 day 23 svn rev 41293 language R

version.string R version 2.5.0 (2007-04-23)

> R.version

platform       x86_64-unknown-linux-gnu
arch           x86_64
os             linux-gnu
system         x86_64, linux-gnu
status
major          2
minor          5.0
year           2007
month          04
day            23
svn rev        41293
language       R

version.string R version 2.5.0 (2007-04-23)

Simone Giannerini
Dipartimento di Scienze Statistiche "Paolo Fortunati" Universita' di Bologna
Via delle belle arti 41 - 40126 Bologna, ITALY Tel: +39 051 2098262 Fax: +39 051 232153


        [[alternative HTML version deleted]]



R-devel_at_r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel Received on Wed 09 May 2007 - 13:17:48 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Wed 09 May 2007 - 14:33:18 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-devel. Please read the posting guide before posting to the list.