Calculating arithmetic mean of technical replicates for subsequent ANOVA analysis

meanTech(x, groups)

Arguments

x

A raw data frame including technical replicates.

groups

grouping columns based on which the mean technical replicates are calculated.

Value

A data frame with the mean of technical replicates.

Details

The meanTech calculates mean of technical replicates. Arithmetic mean of technical replicates can be calculated in order to simplify the statistical comparison between sample groups.

Author

Ghader Mirzaghaderi

Examples


# See example input data frame:
data_withTechRep
#>    factor1 factor2 factor3 biolrep techrep Etarget targetCt Eref  refCt
#> 1    Line1    Heat    Ctrl       1       1       2   33.346    2 31.520
#> 2    Line1    Heat    Ctrl       1       2       2   28.895    2 29.905
#> 3    Line1    Heat    Ctrl       1       3       2   28.893    2 29.454
#> 4    Line1    Heat    Ctrl       2       1       2   30.411    2 28.798
#> 5    Line1    Heat    Ctrl       2       2       2   33.390    2 31.574
#> 6    Line1    Heat    Ctrl       2       3       2   33.211    2 31.326
#> 7    Line1    Heat    Ctrl       3       1       2   33.845    2 31.759
#> 8    Line1    Heat    Ctrl       3       2       2   33.345    2 31.548
#> 9    Line1    Heat    Ctrl       3       3       2   32.500    2 31.477
#> 10   Line1    Heat   Treat       1       1       2   33.006    2 31.483
#> 11   Line1    Heat   Treat       1       2       2   32.588    2 31.902
#> 12   Line1    Heat   Treat       1       3       2   33.370    2 31.196
#> 13   Line1    Heat   Treat       2       1       2   36.820    2 31.440
#> 14   Line1    Heat   Treat       2       2       2   32.750    2 31.300
#> 15   Line1    Heat   Treat       2       3       2   32.450    2 32.597
#> 16   Line1    Heat   Treat       3       1       2   35.238    2 31.461
#> 17   Line1    Heat   Treat       3       2       2   28.532    2 30.651
#> 18   Line1    Heat   Treat       3       3       2   28.285    2 30.745

# Calculating mean of technical replicates
meanTech(data_withTechRep, groups = 1:4)
#>   factor1 factor2 factor3 biolrep Etarget targetCt Eref    refCt
#> 1   Line1    Heat    Ctrl       1       2 30.37800    2 30.29300
#> 2   Line1    Heat    Ctrl       2       2 32.33733    2 30.56600
#> 3   Line1    Heat    Ctrl       3       2 33.23000    2 31.59467
#> 4   Line1    Heat   Treat       1       2 32.98800    2 31.52700
#> 5   Line1    Heat   Treat       2       2 34.00667    2 31.77900
#> 6   Line1    Heat   Treat       3       2 30.68500    2 30.95233

# Calculating mean of technical replicates
meanTech(Lee_etal2020qPCR, groups = 1:3)
#>    factor1  DS biolRep APOE_efficiency APOE_Ct GAPDH_efficiency GAPDH_Ct
#> 1    DSWHi D12       1           2.120  24.710            2.190   14.675
#> 2    DSWHi D12       2           1.985  27.785            1.935   16.385
#> 3    DSWHi D12       3           2.030  26.395            2.025   14.290
#> 4    DSWHi D15       1           2.100  27.030            2.045   15.130
#> 5    DSWHi D15       2           2.005  29.780            2.075   15.870
#> 6    DSWHi D15       3           2.005  28.205            2.155   13.810
#> 7    DSWHi D18       1           2.110  28.865            2.060   15.095
#> 8    DSWHi D18       2           1.935  31.380            1.885   16.110
#> 9    DSWHi D18       3           2.105  30.385            2.075   14.005
#> 10   DSWHi  D7       1           2.080  24.175            2.100   15.260
#> 11   DSWHi  D7       2           1.970  26.480            2.025   16.715
#> 12   DSWHi  D7       3           2.195  24.830            2.175   14.725
#> 13    DSWi D12       1           1.945  25.330            2.080   15.840
#> 14    DSWi D12       2           1.920  24.160            2.030   14.725
#> 15    DSWi D12       3           2.105  23.830            2.335   14.745
#> 16    DSWi D15       1           1.905  28.615            1.895   16.180
#> 17    DSWi D15       2           1.935  28.280            1.990   14.755
#> 18    DSWi D15       3           2.125  27.005            2.395   14.735
#> 19    DSWi D18       1           1.930  29.730            2.040   16.585
#> 20    DSWi D18       2           2.085  28.655            1.970   14.490
#> 21    DSWi D18       3           2.090  28.680            2.140   14.060
#> 22    DSWi  D7       1           2.035  25.835            2.000   16.625
#> 23    DSWi  D7       2           2.085  24.145            2.080   14.895
#> 24    DSWi  D7       3           2.305  23.330            2.145   14.470
#> 25     DSi D12       1           1.970  26.460            1.960   16.315
#> 26     DSi D12       2           2.095  25.305            1.945   16.275
#> 27     DSi D12       3           1.965  24.650            2.065   14.835
#> 28     DSi D15       1           1.915  29.240            1.940   16.200
#> 29     DSi D15       2           1.975  27.275            1.975   16.390
#> 30     DSi D15       3           1.935  26.940            2.045   14.855
#> 31     DSi D18       1           2.005  30.980            1.965   16.230
#> 32     DSi D18       2           1.960  30.215            1.970   16.305
#> 33     DSi D18       3           2.110  29.890            2.075   14.735
#> 34     DSi  D7       1           2.000  25.090            2.020   17.065
#> 35     DSi  D7       2           2.045  24.260            1.915   16.280
#> 36     DSi  D7       3           1.910  23.680            2.035   15.205