building classes with slots of type "timeDate"

Martin Maechler maechler at stat.math.ethz.ch
Thu Oct 7 19:16:47 CEST 2010


I digged and found that the warning can be more easily
produced by

  new("timeDate")

and we should fix that, maybe by providing a prototype.
or rather I think by fixing the initialize() method we have
there..

Thank you, Tomas, for your good report!

Martin Maechler, ETH Zurich


>>>>> "t" == torgrims  <torgrims at stud.ntnu.no>
>>>>>     on Thu,  7 Oct 2010 15:40:03 +0200 writes:

    t> Dear rmetrics core team,
    t> As this email was listed in the package timeDate july26.2010 I post  
    t> this question here. When defining an S4 class with slot of type  
    t> "timeDate", I get this warning. Is this a bug or a feature?

    >> library(timeDate)
    >> setClass(
    t> +         "testClass",
    t> +         representation(
    t> +                 slot = "timeDate"
    t> +         )
    t> + )
    t> [1] "testClass"
    t> Warning message:
    t> In is.na(num) : is.na() applied to non-(list or vector) of type 'NULL'
    >> 

    t> Best regards
    t> Tomas

    t> _______________________________________________
    t> Rmetrics-core mailing list
    t> Rmetrics-core at r-project.org
    t> https://stat.ethz.ch/mailman/listinfo/rmetrics-core



More information about the Rmetrics-core mailing list