From 4d996e6ca9acd22b758a39f3386df66fe7f47228 Mon Sep 17 00:00:00 2001 From: Walmes Zeviani <walmes@ufpr.br> Date: Mon, 18 Apr 2016 20:35:23 -0300 Subject: [PATCH] =?UTF-8?q?Adequa=C3=A7=C3=B5es=20para=20exibi=C3=A7=C3=A3?= =?UTF-8?q?o.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- scripts/03_S_distr.R | 17 ++++++----------- 1 file changed, 6 insertions(+), 11 deletions(-) diff --git a/scripts/03_S_distr.R b/scripts/03_S_distr.R index bc01b9a..c641490 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, -- GitLab