diff --git a/scripts/03_S_distr.R b/scripts/03_S_distr.R
index bc01b9a06974f26719b04cdace20381ba1e4a843..c641490421e4d206f685669c640eb6c92be50d96 100644
--- a/scripts/03_S_distr.R
+++ b/scripts/03_S_distr.R
@@ -54,8 +54,6 @@ str(L)
 
 L <- do.call(rbind, L)
 
-library(reshape)
-
 M <- melt(data = L, id.vars = "n",
           variable_name = "estim")
 str(M)
@@ -74,19 +72,13 @@ str(M)
 with(M, tapply(value, list(estim, n), mean))
 with(M, tapply(value, list(estim, n), sd))
 
-aggregate(M$value[subscripts],
-          M$estim[subscripts],
-          FUN = function(x) c(mean(x), sd(x)))
+xtabs(~estim + n, data = M)
 
 a <- aggregate(cbind(y = M$value),
-          by = list(M$estim),
-          FUN = function(x) c(mean(x), sd(x)))
+               by = list(M$estim, M$n),
+               FUN = function(x) c(mean(x), sd(x)))
 a
 
-c(t(apply(a[, -1], 1, FUN = function(x) { x[1] + c(-1, 0, 1) * x[2]})))
-
-xtabs(~estim + n, M)
-
 densityplot(~value | factor(n), groups = estim, data = M,
             # scales = "free",
             auto.key = TRUE, as.table = TRUE,
@@ -159,6 +151,9 @@ obj <- qcc(data = da, type = "S")
 n <- c(5, 3, 5, 5, 5, 4, 4, 5, 4, 5, 5, 5, 3, 5, 3, 5, 4, 5, 5, 3, 5, 5,
        5, 5, 5)
 
+da <- data.frame(i = rep(1:length(n), 5),
+                 x = x)
+
 # Cada amostra separada.
 L <- do.call(rbind,
              by(data = da, INDICES = da$i,