Skip to content
Prev 201135 / 398503 Next

Input file format to Anova from car package

Marcelo Laia wrote:
It's wrong because your use of Anova is inappropriate here.
mod.ok should be an object of class "mlm" for this use of Anova.

  class(mod.ok)

or

  str(mod.ok)

would be useful.
See below for further comments.
This works because you now have mod.ok as an "mlm" object.
Let's call your first data.frame dat.long. Then you can use:

  dat.wide <- reshape(dat, timevar="day",
               idvar = c("Hormone", "Block", "Treatment", "Plant"),
               direction = "wide")

Note that the two data frames you give are not consistent.

You could also investigate the reshape package which makes a
lot of reshaping easier.

  -Peter Ehlers