I think what I did was run attributes(tmp)$dimnames<-NULL, but to get rid of
all the structure stuff I needed to run attributes(tmp)<-NULL.
The str() output I had before was after running
attributes(tmp)$dimnames<-NULL, so without any additional data from the
structure (originally V2 was the result of a call to tapply() on a larger
vector).

Here's the output of dump("tmp"):

tmp <-
structure(list(V1 = c(2L, 2L, 2L, 2L, 2L, 3L, 3L, 3L, 3L, 3L,
3L, 3L, 3L, 3L, 3L, 5L, 5L, 5L, 5L, 5L, 4L, 1L), V2 = structure(c(1.010223,
1.0373085, 1.0709125, 1.019632, 1.032068, 1.120029, 1.3602485,
0.9572956, 1.0438845, 1.07723, 1.232857, 1.2246855, 1.008405,
1.037069, 1.109897, 1.0617635, 0.99650495, 1.0230875, 1.0483565,
1.073022, 1.035214, 0.9967045), .Dim = 22L), V3 = c(4.214007,
3.679315, 7.123898, 3.315951, 1.81672, 4.032529, 3.095994, 2.084266,
2.685965, 2.365525, 3.41177, 6.487154, 1.604934, 3.478011, 3.614858,
3.085864, 1.979418, 4.055808, 4.122687, 3.901821, 1.75092, 1.207486
)), .Names = c("V1", "V2", "V3"), row.names = c(NA, -22L), class =
"data.frame")



On Thu, Feb 24, 2011 at 4:51 PM, David Duffy <davidD@qimr.edu.au> wrote:

> On Thu, 24 Feb 2011, Martha Ellis wrote:
>
>  I've run across this error using lme().  Seems like it's got to be
>> something
>> small and format-y.  In trying to set up some reproducible data, I found a
>> slight difference that changes whether or not you get the error message.
>>
>> So, originally the dataframe that I was working with has these attributes:
>>
>>> str(tmp)
>>>
>> 'data.frame':   22 obs. of  3 variables:
>> $ V1: int  2 2 2 2 2 3 3 3 3 3 ...
>> $ V2: num [1:22(1d)] 1.01 1.04 1.07 1.02 1.03 ...
>> $ V3: num  4.21 3.68 7.12 3.32 1.82 ...
>>
>> And if I run [an lme] model, I get the non-conformable arrays
>> error:
>>
>> But, if you copy and paste the data back in, it drops the dimnames
>> attribute. Here's the output of str():
>>
>>> str(tmp)
>>>
>> 'data.frame':   22 obs. of  3 variables:
>> $ species: int  2 2 2 2 2 3 3 3 3 3 ...
>> $ hold   : num  1.01 1.04 1.07 1.02 1.03 ...
>> $ react  : num  4.21 3.68 7.12 3.32 1.82 ...
>>
>> And now it runs, no problem:
>>
>
> Why does str(tmp) give the length only of V2 on the first occasion?  Can
> you dump("tmp") from that version for us to see?
>
> Cheers, David Duffy.
> --
> | David Duffy (MBBS PhD)                                         ,-_|\
> | email: davidD@qimr.edu.au  ph: INT+61+7+3362-0217 fax: -0101  /     *
> | Epidemiology Unit, Queensland Institute of Medical Research   \_,-._/
> | 300 Herston Rd, Brisbane, Queensland 4029, Australia  GPG 4D0B994A v
>

	[[alternative HTML version deleted]]


