[R] Error: object is not a matrix
Peter Ho
peter at esb.ucp.pt
Fri Aug 23 15:47:49 CEST 2002
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:
>There is another call to deparse in aov(), Does adding width = 500 to
>that call solve this?
>
>
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, ...)
>If not, please submit a bug report with a reproducible example: there is
>nothing here I can try.
>
>On Thu, 22 Aug 2002, Albert Kim wrote:
>
>
>
>>I have updated to R 1.5.1, but now get a new error, which appears to
>>have the same cause:
>>
>>
>>
>>>AK.df <<- read.table("foo.data", col.names = c("Y","P","A","B","CLongFactorName"))
>>>AK.df$P <- as.factor(AK.df$P)
>>>attach(AK.df)
>>>
>>>
>>>AKanova.out <- aov(Y ~ A * B * CLongFactorName + Error(P + P:A + P:B +
>>>
>>>
>>P:CLongFactorName + P:A:B + P:A:CLongFactorName + P:B:CLongFactorName +
>>P:A:B:CLongFactorName), data=AK.df)
>>
>>Error in eval(expr, envir, enclos) : couldn't find function "Error"
>>
>>I can avoid the error by either of the following steps:
>> 1) replace "CLongFactorName" with the shorter label "C"
>> 2) reduce the number of terms in my Error formula.
>>
>>Thanks
>>Al
>>--
>>Al Kim
>>Research Scientist
>>Department of Psychology
>>University of Washington, Box 351525
>>Seattle, WA. 98195, USA
>>E-Mail: alkim at u.washington.edu; Tel: (206)543-2395
>>
>>
>>On Thu, 22 Aug 2002, Albert Kim wrote:
>>
>>
>>
>>>I'm running 1.4.1. I'll try the latest version.
>>>Thanks,
>>>Al Kim
>>>Research Scientist
>>>Department of Psychology
>>>University of Washington, Box 351525
>>>Seattle, WA. 98195, USA
>>>E-Mail: alkim at u.washington.edu; Tel: (206)543-2395
>>>
>>>
>>>On 22 Aug 2002, Peter Dalgaard BSA wrote:
>>>
>>>
>>>
>>>>Albert Kim <alkim at u.washington.edu> writes:
>>>>
>>>>
>>>>
>>>>>I have reproduced this error in a number of ways, and the only common
>>>>>characteristic I can see to my actions is that the length of the call
>>>>>to 'aov' is always too long: either one of the variable names is too
>>>>>long, or I include too many error terms, etc...).
>>>>>
>>>>>
>>>>A similar error was fixed in 1.5.0. Which version are you using?
>>>>
>>>> o aov() and model.tables() were failing on multistrata models with
>>>> excessively long Error formula. (PR#1315)
>>>>
>>>>
>>>>--
>>>> O__ ---- Peter Dalgaard Blegdamsvej 3
>>>> c/ /'_ --- Dept. of Biostatistics 2200 Cph. N
>>>> (*) \(*) -- University of Copenhagen Denmark Ph: (+45) 35327918
>>>>~~~~~~~~~~ - (p.dalgaard at biostat.ku.dk) FAX: (+45) 35327907
>>>>-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
>>>>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
>>>>_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
>>>>
>>>>
>>>>
>>>-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
>>>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
>>>_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
>>>
>>>
>>>
>>-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
>>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
>>_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
>>
>>
>>
>
>
>
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
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
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
More information about the R-help
mailing list