Skip to content
Prev 395326 / 398502 Next

How to Calculate the Mean by Multiple Groups in R

Hi,

I think you're misunderstanding which set of variables go on either
side of the formula.

Is this what you're looking for?
Time Target Conc       OD
1    1   BACT    1 765.3333
2    1   BACT    2 745.3333
3    1   BACT    3 675.0000
Time Target Conc    ODnorm
1    1   BACT    1 108.33333
2    1   BACT    2  88.33333
3    1   BACT    3  18.00000

Or using a different form, that might be more straightforward to you:
Time Target Conc       OD    ODnorm
1    1   BACT    1 765.3333 108.33333
2    1   BACT    2 745.3333  88.33333
3    1   BACT    3 675.0000  18.00000

Sarah
On Tue, Oct 24, 2023 at 8:31?AM Luigi Marongiu <marongiu.luigi at gmail.com> wrote: