我们有一个我们定义的 S3 类plot
和其他通用函数。我们不确定...
必须去哪里。有两种选择:
plot.hadronacf(x, col = "black", ...)
plot.hadronacf(x, ..., col = "black")
同样对于print.
和summary.
。
在它的用法上summary
似乎不一致:
summary(object, ...)
## Default S3 method:
summary(object, ..., digits)
## S3 method for class 'data.frame'
summary(object, maxsum = 7,
digits = max(3, getOption("digits")-3), ...)
## S3 method for class 'factor'
summary(object, maxsum = 100, ...)
## S3 method for class 'matrix'
summary(object, ...)
## S3 method for class 'summaryDefault'
format(x, digits = max(3L, getOption("digits") - 3L), ...)
## S3 method for class 'summaryDefault'
print(x, digits = max(3L, getOption("digits") - 3L), ...)
因为print
省略号似乎结束了:
print(x, ...)
## S3 method for class 'factor'
print(x, quote = FALSE, max.levels = NULL,
width = getOption("width"), ...)
## S3 method for class 'table'
print(x, digits = getOption("digits"), quote = FALSE,
na.print = "", zero.print = "0",
right = is.numeric(x) || is.complex(x),
justify = "none", ...)
## S3 method for class 'function'
print(x, useSource = TRUE, ...)
似乎大多数情况下都使用最后的省略号。对此有一些指导方针吗?