From prokaj at cs.elte.hu  Wed Oct 15 09:05:04 2008
From: prokaj at cs.elte.hu (prokaj at cs.elte.hu)
Date: Wed, 15 Oct 2008 09:05:04 +0200 (CEST)
Subject: [Rd] aggregate(empty data.frame) (PR#13167)
Message-ID: <20081015070504.6707E282C787@mail.pubhealth.ku.dk>

Full_Name: Vilmos Prokaj
Version: R-2..7.1
OS: Win XP
Submission from: (NULL) (157.181.227.218)


The 'aggregate' function on an empty data.frame generate an error, however it
should return according to the documentation an empty data.frame.

e.g.
z<-data.frame(a=integer(0),b=numeric(0))
aggregate(z,by=z[1],FUN=sum)

In a more realistic situation 'z' is of the form z<-zz[cond,] where cond is a
computed logical vector and zz is not empty data.frame.



[Rd] aggregate(empty data.frame) (PR#13167)
prokaj at cs.elte.hu