[R] producing a QQ plot.
Stefan Grosse
singularitaet at gmx.net
Sat Mar 27 11:24:24 CET 2010
Am 27.03.2010 10:45, schrieb Philip Wong:
>
>> mah=mahalanobis(data,apply(data,2,mean),var(data))
>>
>
>> mah=mahalanobis(data,apply(data,2,mean),var(no_fisher))
>>
> qqplot(qchisq(ppoints(data),ncol(data),data)
>
As Joshua already pointed out: you are trying mathematical functions on
names. Your Data containes e.g. Village names.
You can exclude those with subset, generating a new data.frame.
If you want averages by categories e.g. by a village have a look at the
doby package, it has a function summaryby that is perfect for generating
aggregated data with multiple functions.
hth
Stefan
More information about the R-help
mailing list