Skip to content
Prev 307690 / 398503 Next

Formatting data for bootstrapping for confidence intervals

Hello,

To aggregate the data use, yes, it's exists, function aggregate.

with(dat, aggregate(cbind(X, Xn, Y), list(Area, DATE), FUN = sum))
# output
   Group.1 Group.2 X Xn Y
1       1 1/10/10 1  1 0
2       1 1/11/10 0  0 1
3       1 1/12/10 3  0 0
4       2 2/12/10 2  1 1
5       2 2/13/10 3  0 0
6       2 2/14/10 4  1 0
7       3 7/27/11 3  1 0
8       3 7/28/11 7  2 2
9       3 7/29/11 3  1 0

And take a look at package boot. Maybe you'll find something there.

Hope this helps,

Rui Barradas


Em 11-10-2012 16:55, Paul Wennekes escreveu: