The R Project SVN R

Rev

Rev 52267 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 52267 Rev 53170
Line 482... Line 482...
482
  the generic function, since the method dispatch mechanism does not
482
  the generic function, since the method dispatch mechanism does not
483
  rematch arguments, for reasons of both efficiency and consistency.
483
  rematch arguments, for reasons of both efficiency and consistency.
484
}
484
}
485
 
485
 
486
\examples{
486
\examples{
487
 
-
 
488
 
-
 
489
## A class that extends a registered S3 class inherits that class' S3
487
## A class that extends a registered S3 class inherits that class' S3
490
## methods.
488
## methods.
491
 
489
 
492
setClass("myFrame", contains = "data.frame",
490
setClass("myFrame", contains = "data.frame",
493
    representation(timestamps = "POSIXt"))
491
    representation(timestamps = "POSIXt"))
Line 511... Line 509...
511
        x@timestamps <- c(Sys.time(), as.POSIXct(x@timestamps))
509
        x@timestamps <- c(Sys.time(), as.POSIXct(x@timestamps))
512
        x
510
        x
513
    }
511
    }
514
)
512
)
515
 
513
 
516
mydf1[1:2, ]
514
\donttest{mydf1[1:2, ]}
517
 
515
 
518
 
516
 
519
setClass("myDateTime", contains = "POSIXt")
517
setClass("myDateTime", contains = "POSIXt")
520
 
518
 
521
now <- Sys.time() # class(now) is c("POSIXct", "POSIXt")
519
now <- Sys.time() # class(now) is c("POSIXct", "POSIXt")