search for: i2date

Displaying 1 result from an estimated 1 matches for "i2date".

Did you mean: u2date
2010 Sep 23
1
Behavior of R CMD build and library() w.r.t. setGeneric-like functions
...ke setGeneric/setMethod in S4. As a simple example, I write code like this: guard(month.date, isa(Date,date)) ensure(month.date, as.numeric(result) < 13) month.date <- function(date) format(date, '%m') guard(month.int, is.numeric(date)) month.int <- function(date) month(i2date(date)) and call it like this: > month(20100913) [1] "09" Behind the scenes, the guard command is using 'assign' to create a parent function with the name 'month'. This can be done explicitly as well, although it is typically not necessary. The parent definition lo...