x1 = c(1,2,4)
x2 = c(2,5,9)
x = list(x1,x2)
# Pooled sample mean (default) by type "A" pooling
pooledEstimator(x)
# Pooled sample sd by type "B" pooling
pooledEstimator(x, estimator="sd", pool="B")
Run the code above in your browser using DataLab