Wolfgang Pauli
2004-Mar-13 00:18 UTC
[R] Error in "names<-.default"(`*tmp*`, value = nmstrata) :
Hi, I have a problem with aov(). I used it many times, but now I have new data, tried to use it in the same way. I get I strange Error message that i can't understand (see below). I guess it is caused by incompatible data types. The dataframe also looks ok to me. I use: spk =factor(rep(c("spk1","spk2","spk3","spk4","spk5","spk6","spk7","spk8"), c(2,2,2,2,2,2,2,2))) cs = factor(rep(c("yes","no"),c(8,8))) sub = factor(sort(spaeVP)) rati = stack(data.frame(arousal)) rati = rati[,1] rating.df <- data.frame(sub, cs, spk, rati) summary(aov(rati ~ cs*spk + Error(sub/(cs*spk)), data=rating.df)) I get this Error (after about 5sec): Error in "names<-.default"(`*tmp*`, value = nmstrata) : names attribute must be the same length as the vector> rating.dfsub cs spk rati 1 5 yes spk1 -1 2 5 yes spk1 0 3 5 yes spk2 1 4 5 yes spk2 0 5 5 yes spk3 0 6 5 yes spk3 -1 7 5 yes spk4 -1 8 5 yes spk4 1 9 5 no spk5 0 ... Hope somebody can help me. with best regards, Wolfgang
Prof Brian Ripley
2004-Mar-13 09:08 UTC
[R] Error in "names<-.default"(`*tmp*`, value = nmstrata) :
This is not reproducible. The last report of this type came about from an incorrectly specified model (the Error model was rank-deficient), and 1.9.0 alpha gave an accurate diagnosis of the error. So please 1) try your example in 1.9.0 alpha 2) if is still fails, supply a reproducible example (what is spaeVP and why is it sorted?) including what you are trying to do with a term like Error(sub/(cs*spk)). On Sat, 13 Mar 2004, Wolfgang Pauli wrote:> Hi, > > I have a problem with aov(). I used it many times, but now I have new data, > tried to use it in the same way. I get I strange Error message that i can't > understand (see below). I guess it is caused by incompatible data types. The > dataframe also looks ok to me. > > I use: > spk =factor(rep(c("spk1","spk2","spk3","spk4","spk5","spk6","spk7","spk8"), > c(2,2,2,2,2,2,2,2))) > cs = factor(rep(c("yes","no"),c(8,8))) > sub = factor(sort(spaeVP)) > rati = stack(data.frame(arousal)) > rati = rati[,1] > rating.df <- data.frame(sub, cs, spk, rati) > summary(aov(rati ~ cs*spk + Error(sub/(cs*spk)), data=rating.df)) > > I get this Error (after about 5sec): > Error in "names<-.default"(`*tmp*`, value = nmstrata) : > names attribute must be the same length as the vector > > > rating.df > sub cs spk rati > 1 5 yes spk1 -1 > 2 5 yes spk1 0 > 3 5 yes spk2 1 > 4 5 yes spk2 0 > 5 5 yes spk3 0 > 6 5 yes spk3 -1 > 7 5 yes spk4 -1 > 8 5 yes spk4 1 > 9 5 no spk5 0 > ... > > Hope somebody can help me. > > with best regards, > > Wolfgang > > ______________________________________________ > R-help at stat.math.ethz.ch mailing list > https://www.stat.math.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html > >-- Brian D. Ripley, ripley at stats.ox.ac.uk Professor of Applied Statistics, http://www.stats.ox.ac.uk/~ripley/ University of Oxford, Tel: +44 1865 272861 (self) 1 South Parks Road, +44 1865 272866 (PA) Oxford OX1 3TG, UK Fax: +44 1865 272595