A variation is to remove Well and then we can use dot to refer to the
remaining columns.
aggregate(cbind(OD, ODnorm) ~ . , subset(df, select = - Well), mean)
On Tue, Oct 24, 2023 at 8:32 AM Luigi Marongiu wrote:
>
> Hello,
> I have a data frame with different groups (Time, Target, Conc) and
Thank you
On Tue, Oct 24, 2023 at 3:01 PM peter dalgaard wrote:
>
> Also,
>
> > aggregate(cbind(OD, ODnorm) ~ Time + Target + Conc, data = df, FUN = "mean")
> Time Target Conc ODODnorm
> 11 BACT1 765. 108.3
> 21 BACT2 745. 88.3
> 31 BACT3
Also,
> aggregate(cbind(OD, ODnorm) ~ Time + Target + Conc, data = df, FUN = "mean")
Time Target Conc ODODnorm
11 BACT1 765. 108.3
21 BACT2 745. 88.3
31 BACT3 675. 18.0
(You might wish for "cbind(OD,ODnorm) ~ . - Well", but aggre
Thank you, the last is exactly what I was looking for.
On Tue, Oct 24, 2023 at 2:41 PM Sarah Goslee wrote:
>
> Hi,
>
> I think you're misunderstanding which set of variables go on either
> side of the formula.
>
> Is this what you're looking for?
>
> > aggregate(OD ~ Time + Target + Conc, data =
Hi,
I think you're misunderstanding which set of variables go on either
side of the formula.
Is this what you're looking for?
> aggregate(OD ~ Time + Target + Conc, data = df, FUN = "mean")
Time Target Conc OD
11 BACT1 765.
21 BACT2 745.
31 BACT3 675
Hello,
I have a data frame with different groups (Time, Target, Conc) and
each entry has a triplicate value of the measurements OD and ODnorm.
How can I merge the triplicates into a single mean value?
I tried the following:
```
df = data.frame(Time=rep(1, 9), Well=paste("A", 1:9, sep=""),
6 matches
Mail list logo