Skip to content
Prev 22882 / 398502 Next

Error: object is not a matrix

I had a similar problem with a long Error formula. I sent an email to 
the list a few days ago.

Subject:
Re: [R]: Bug in Error() and the use of Error() for repeated measures 
with more than 2 factors
From:
Peter Ho <peter at esb.ucp.pt>
Date:
Mon, 19 Aug 2002 14:33:01 +0100

To:
ripley at stats.ox.ac.uk, r-help at stat.math.ethz.ch


I have repeated my analysis using shorter factor names , where the 
following  original formula:


simulation.blockE.aov.CV.3waymodel <- aov(CV 
~(Twb+Plb+Psb+tinsb+tseedb+Tmb+Mcb+Mom0b+Mom1b+Mom2b+Mom3b)^3 + 
Error(Batch / 
(Twb+Plb+Psb+tinsb+tseedb+Tmb+Mcb+Mom0b+Mom1b+Mom2b+Mom3b)), data= 
simulation.6batches.aovdata)

 gave an error:

Error in eval(expr, envir, enclos) : couldn't find function "Error"

The now shortened factor names formula below works :

simulation.blockE.aov.CV.3waymodel.S <- aov(CV 
~(Tw+Pl+Ps+ti+ts+Tm+Mc+M0+M1+M2+M3)^3 + Error(B/ 
(Tw+Pl+Ps+ti+ts+Tm+Mc+M0+M1+M2+M3)),simulation.aovdata.S)

So this solves the problem I had earlier, although
ripley at stats.ox.ac.uk wrote:

            
I have tried this , but got the following error:

 > simulation.blockE.aov.CV.3waymodel <- aov(CV 
~(Twb+Plb+Psb+tinsb+tseedb+Tmb+Mcb+Mom0b+Mom1b+Mom2b+Mom3b)^3 + 
Error(Batch / 
(Twb+Plb+Psb+tinsb+tseedb+Tmb+Mcb+Mom0b+Mom1b+Mom2b+Mom3b)),width = 500, 
data= simulation.6batches.aovdata)

Error in eval(expr, envir, enclos) : couldn't find function "Error"
In addition: Warning message:
Extra arguments 500 are just disregarded. in: lm.fit(x, y, offset = 
offset, ...)
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-help-request at stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._