I would like to write a function that computes Tukey's 1 df for
nonadditivity. Here is a simplified version of the function I'd like to
write: (m is an object created by lm):
tukey.test <- function(m) {
m1 <- update(m, ~.+I(predict(m)^2))
summary(m1)$coef
}
The t-test for the added vari
Can anyone explain what I'm doing wrong here:
> fred <- data.frame()
> class(fred)
[1] "data.frame"
> test.fn <- function(x,class=class(x)) {class}
> test.fn(fred)
Error in test.fn(fred) : promise already under evaluation: recursive
default argument reference or earlier problems?
R 2.5.1 on
2 matches
Mail list logo