Code:
install.packages("matrixStats")
library("matrixStats")
test <- matrix( ncol=6, byrow=TRUE,
dimnames = list(NULL, c( "2.6.39", "3.0", "3.1", "3.2", "3.3", "3.4 Git" )),
c( # numbers by hand, errors possible
81.73, 79.20, 86.57, 80.80, 81.83, 81.10,
94.03, 94.07, 94.50, 94.00, 95.33, 97.87,
77.97, 79.17, 80.47, 77.70, 78.07, 80.85,
151.23, 146.37, 148.48, 142.40, 147.92, 146.38,
207.97, 206.57, 214.83, 204.47, 240.86, 242.81,
101.13, 103.45, 105.37, 104.75, 104.85, 107.67,
92.35, 95.12, 95.47, 90.76, 94.57, 95.71,
119.46, 240.53, 120.43, 116.55, 128.11, 126.90,
23.84, 23.79, 26.35, 26.02, 26.40, 26.47,
96.90, 97.27, 98.70, 94.70, 95.70, 95.50,
32.40, 32.40, 33.30, 33.10, 33.73, 33.73,
83.38, 83.26, 95.39, 95.96, 96.69, 96.78,
5486.26, 5492.40, 5523.62, 5501.83, 5567.22, 5561.23,
86.43, 86.07, 86.36, 86.35, 86.25, 86.46,
2437.40, 2440.64, 2476.31, 2514.63, 2539.99, 2537.84,
20.00, 19.72, 20.21, 20.41, 20.73, 20.93,
3287.02, 3228.48, 3243.00, 3239.22, 3269.52, 3266.19,
15.10, 15.31, 14.53, 14.31, 13.97, 13.55,
60.25, 60.44, 62.36, 62.39, 63.27, 63.20,
9.81, 9.60, 9.74, 9.98, 10.02, 9.93,
56.43, 56.42, 57.57, 58.38, 58.54, 58.63,
8196.00, 8327.00, 8190.00, 8820.00, 8912.00, 8908.00,
185.36, 185.17, 183.95, 184.18, 182.34, 181.97,
106.91, 106.90, 106.78, 106.79, 106.44, 131.46
)
)
test.gavg <- colProds(test) ^ (1/nrow(test)) # geometric mean ...
test.gavg
test.gavg * 100 / test.gavg[1] # reference to first