Skip to content
Prev 138301 / 398506 Next

Help needed in R

For me is not very clear, but if I understand:

sapply(sort(unique(data[data[,2]==1,1])),
               function(x)sum(data[data[,2]==1 & data[,1] <= x, 1]))

But the output is:
2  6 31 71 86
On 03/03/2008, AbouEl-Makarim Aboueissa <aaboueissa at usm.maine.edu> wrote: