I wonder how to  use xts in setClass().   It seems that zoo is OK.
Thanks.

Wind


> library(quantmod)
Loading required package: xts
Loading required package: zoo

Attaching package: 'zoo'


The following object(s) are masked from package:base :

 as.Date.numeric

xts now requires a valid TZ environment variable to be set
 your current TZ:CST-8
Loading required package: Defaults
Loading required package: TTR
> setClass("trader",representation(prices="zoo",indicator="zoo"))
[1] "trader"
> setClass("trader",representation(prices="xts",indicator="xts"))
[1] "trader"
Warning message:
In .completeClassSlots(ClassDef, where) :
  undefined slot classes in definition of "trader": prices(class "xts"),
indicator(class "xts")

> sessionInfo()
R version 2.9.2 (2009-08-24)
i386-pc-mingw32

locale:
LC_COLLATE=Chinese (Simplified)_People's Republic of
China.936;LC_CTYPE=Chinese (Simplified)_People's Republic of
China.936;LC_MONETARY=Chinese (Simplified)_People's Republic of
China.936;LC_NUMERIC=C;LC_TIME=English_United States.1252

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base

other attached packages:
[1] quantmod_0.3-11 TTR_0.20-1      Defaults_1.1-1  xts_0.6-7
[5] zoo_1.5-8

loaded via a namespace (and not attached):
[1] grid_2.9.2      lattice_0.17-25
>

	[[alternative HTML version deleted]]

