Hello :)
I have two data frames, one has properties taken on a
piece by piece basis and the other has performance on
a lot by lot basis. I wish to combine these two data
frames but the problem is that each lot has multiple
pieces and hence i need to take a mean of the
properties of multiple
Dear Avneet
the function aggregate (see also ?aggregate) could be useful for
your problem. See the short example I've written below.
dat1 - data.frame(lot = factor(1:10),y1 = rnorm(10))
str(dat1)
dat2 - data.frame(nr = 1:100, lot = factor(rep(1:10, each = 10)),y2 =
rnorm(100))
str(dat2)