On Fri, 26 Dec 2008, Therneau, Terry M., Ph.D. wrote:
Brian,
Thanks for the comments.
-- I agree that the vector form is more compact. I was using a loop
because I found it to be even more transparent to the class. For a one
time task such as this efficiency is not an issue.
-- I'll make use
Brian,
Thanks for the comments.
-- I agree that the vector form is more compact. I was using a loop
because I found it to be even more transparent to the class. For a one
time task such as this efficiency is not an issue.
-- I'll make use of eval.parent(). I hadn't yet stumbled on that
-- T
The issue is that you are using [["weights"]] to add an element. It works
for existing eleents as well as for [<- and $<-.
However, I would have done this without a loop
nm <- c("data", "weights", "subset", "na.action")
extras <- nm %in% names(Call)
temp[ nm[extras] ] <
On Thu, 25 Dec 2008, Terry Therneau wrote:
The following code works in Splus but not in R
coxph <- function(formula, data, weights, subset, na.action,
init, control, method= c("efron", "breslow", "exact"),
singular.ok =TRUE, robust=FALSE,
model=FALSE, x=FALSE, y=TRUE, .
The following code works in Splus but not in R
coxph <- function(formula, data, weights, subset, na.action,
init, control, method= c("efron", "breslow", "exact"),
singular.ok =TRUE, robust=FALSE,
model=FALSE, x=FALSE, y=TRUE, ...) {
method <- match.arg(method)
Ca