Hello,
I have questions while reviewing "chron" package(e.g.,chron.R). 1. What is the differences between 3 kinds of function definition ? 1) "name" <- function(... 2) 'name' <- function(... 3) name <- function(... Do you know Why author used various kinds of definitions ? Is there no functional differences between them ? 2. I don't understand the meaning of the below code: as.chron <- function(x, ...) UseMethod("as.chron") as.chron.default <- function (x, format, ...) { .... Could you let me know what is role of UseMethod("as.chron") ? 3. In the following code, "chron" <- function(dates. = NULL, times. = NULL, format = c(dates = "m/d/y", times = "h:m:s"), out.format, origin.) 'dates', 'origin' and 'times' has dot(.) as at the end of word. Do you know the meaning of dots ? 4. Could you introduce me some books on S/R language, especially for understanding of generic functions ? Some interesting packages such as quantmod, xts, zoo, etc., are seems to be coded using generic functions(UseMethod(..)). But I can't easily understand the code. Thanks in advance, [[alternative HTML version deleted]] ______________________________________________ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.