Skip to content
Back to formatted view

Raw Message

Message-ID: <sa01abf4.099@tedmail.lgc.co.uk>
Date: 2009-05-06T14:25:25Z
From: S Ellison
Subject: tapply changing order of factor levels?

The problem is in the code.

When you say
>> mysummary<-tapply(myfactor,mydata,length)
>> mysummary

you have used mydata as a factor and myfactor as  the data.

tapply has (correctly) used the ordered labels in the grouping factor
(mydata) to label its output.

If you did what you probably intended:
tapply(mydata, myfactor,length)

you'll get the order you expected.



*******************************************************************
This email and any attachments are confidential. Any use...{{dropped:8}}