Skip to content
Prev 361359 / 398506 Next

Application of "merge" and "within"

Notice that within-group processing is intended. I'd try
Or perhaps

q <- within(q, Ga <- paste(G,a))
tbl <- with(q, tapply(b, Ga, first))
s <- within(q, {bl <- tbl[Ga]; db <- b - bl})

-pd
On 28 May 2016, at 22:53 , Duncan Murdoch <murdoch.duncan at gmail.com> wrote: