[R] Doubt about aov and lm function... bug?
Jose Claudio Faria
joseclaudio.faria at gmail.com
Wed Apr 8 22:48:13 CEST 2009
# a) aov
> av <- aov(Sepal.Length ~ Species, data=iris)
Error in parse(text = x) :
unexpected symbol in "Sepal(Sepal.Length+Species)Length"
> traceback()
13: parse(text = x)
12: eval(parse(text = x)[[1]])
11: formula(eval(parse(text = x)[[1]]))
10: formula.character(object, env = baseenv())
9: formula(object, env = baseenv())
8: as.formula(frml)
7: expand.formula(frml, colnames(data))
6: model.matrix.formula(mt, mf, contrasts)
5: model.matrix(mt, mf, contrasts)
4: lm(formula = Sepal.Length ~ Species, data = iris, singular.ok = TRUE)
3: eval(expr, envir, enclos)
2: eval(lmcall, parent.frame())
1: aov(Sepal.Length ~ Species, data = iris)
# b) lm
> lm1 <- lm(Sepal.Length ~ Sepal.Width, data=iris)
Error in parse(text = x) :
unexpected symbol in "Sepal(Sepal.Length+Sepal.Width)Length"
> traceback()
10: parse(text = x)
9: eval(parse(text = x)[[1]])
8: formula(eval(parse(text = x)[[1]]))
7: formula.character(object, env = baseenv())
6: formula(object, env = baseenv())
5: as.formula(frml)
4: expand.formula(frml, colnames(data))
3: model.matrix.formula(mt, mf, contrasts)
2: model.matrix(mt, mf, contrasts)
1: lm(Sepal.Length ~ Sepal.Width, data = iris)
HTH,
--
///\\\///\\\///\\\///\\\///\\\///\\\///\\\///\\\
Jose Claudio Faria
Estatistica - prof. Titular
UESC/DCET/Brasil
joseclaudio.faria at gmail.com
joseclaudio.faria at terra.com.br
///\\\///\\\///\\\///\\\///\\\///\\\///\\\///\\\
More information about the R-help
mailing list