[R-SIG-Finance] timeDate class query
chalabi at phys.ethz.ch
Thu Jul 24 20:05:42 CEST 2008
>>>> "IS" == "Ian Seow" <ianseow at gmail.com>
>>>> on Thu, 24 Jul 2008 09:16:25 +0800
IS> Hi Yohan thanks for your reply. Are you referring to version 270.75
IS> for fCalendar? This is the latest version I could find and it is the
IS> version I am currently using. I must be missing something, because
IS> when I try length(timeCalendar( ) ) I get the following error:
IS> > test=timeCalendar(m = c(9, 1, 8, 2), d = c(28, 15, 30, 9),
IS> + y = c(1989, 2001, 2004, 1990), FinCenter = "GMT")
IS> > test
IS>  [1989-09-28] [2001-01-15] [2004-08-30] [1990-02-09]
IS> > length(test)
IS> Error in prod(x at Dim) : no slot of name "Dim" for this object of class "timeDate"
timeDate class used to have a @Dim two or three versions ago. As far
as I can see, all references to @Dim have been removed.
the function length.timeDate is defined in v270.75 as :
# A function implemented by Diethelm Wuertz
# Gets the length of a 'timeDate' vector
# x - a 'timeDate' object
# Returns the lengths of an object of class 'timeDate'.
ans = length(x at Data)
# Return Value:
as you can see there is no reference to @Dim.
Could you please show us how your length.timeDate looks like.
Swiss Federal Institute of Technology
More information about the R-SIG-Finance