[Rd] tapply on empty data.frames (PR#10644)

2008-01-27 Thread hilmar . berger
Full_Name: Hilmar Berger Version: 2.4.1/2.6.2alpha OS: WinXP Submission from: (NULL) (84.185.128.110) Hi all, If I use tapply on an empty data.frame I get an error. I'm not quite sure if one can actually expect the function to return with a result. However, the error message suggests that this c

Re: [Rd] tapply on empty data.frames (PR#10644)

2008-01-28 Thread ripley
It's not about data frames: you did not pass tapply a data frame. There's quite a few strange things here. More likely you intended > sapply(split(z1$a, z1$b), length) but that gives list() whereas > z2 <- subset(z,a == 4) > sapply(split(z2$a, z2$b), length) a b c d 0 0 0 1 is as one might ex