[R-SIG-Finance] timeDate class query
Yohan Chalabi
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>
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>
IS> > test
IS> GMT
IS> [1] [1989-09-28] [2001-01-15] [2004-08-30] [1990-02-09]
IS>
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 :
length.timeDate <-
function(x)
{
# A function implemented by Diethelm Wuertz
# Description:
# Gets the length of a 'timeDate' vector
# Arguments:
# x - a 'timeDate' object
# Value:
# Returns the lengths of an object of class 'timeDate'.
# FUNCTION:
# Length:
ans = length(x at Data)
# Return Value:
ans
}
as you can see there is no reference to @Dim.
Could you please show us how your length.timeDate looks like.
regards,
Yohan
--
PhD student
Swiss Federal Institute of Technology
Zurich
www.ethz.ch
www.rmetrics.org
More information about the R-SIG-Finance
mailing list