[R-br] boxplot com outliers, como colocar os valores?

Christina Grupioni chrisgrupioni em gmail.com
Segunda Fevereiro 6 12:15:11 BRST 2017


Olá listeiros!

Estou precisando incluir o valor dos outliers no boxplot que estou plotando
junto com o histograma. E também necessito incluir o valor dos quartis. É
possível?

O código que estou usando é o seguinte.

mat <- matrix(c(1,2,0,0), 2)
mat
layout(mat, c(3.5,1), c(1,3))
par(mar=c(0.5, 4.5, 0.5, 0.5))
boxplot(campo$ef, horizontal=TRUE, axes=FALSE, col=(cores))
par(mar=c(4.5, 4.5, 0.5, 0.5))
par(cex.axis=0.8,cex.main=1)
hist(campo$ef,col=(cores),main="Histograma da Eficiência de
colheita",xlab=("Eficiência
(%)"),ylab="Frequencia",adj=0,breaks=12,border="white", labels=qcap)
axis(1,at=seq(50,100,5))
axis(2,at=seq(0,22,2))
density.default(campo$ef)
d<-density(campo$ef)
par(new=TRUE)
plot(d,ann=FALSE, axes=FALSE)
-- 

Abaixo aqui meus dados. Não sei se está correto, sou nova mesmo no uso e me
indicaram usar o comando dput para incluir os dados no post:

dput(campo)
structure(list(trat = c(1L, 1L, 1L, 1L, 2L, 2L, 2L, 2L, 3L, 3L,
3L, 3L, 4L, 4L, 4L, 4L, 5L, 5L, 5L, 5L, 6L, 6L, 6L, 6L, 7L, 7L,
7L, 7L, 8L, 8L, 8L, 8L), cacho = c(34L, 35L, 15L, 33L, 24L, 28L,
25L, 29L, 14L, 8L, 5L, 13L, 20L, 31L, 32L, 27L, 9L, 10L, 11L,
12L, 26L, 23L, 22L, 21L, 6L, 4L, 7L, 2L, 19L, 18L, 17L, 16L),
    carret = structure(c(1L, 1L, 2L, 1L, 1L, 1L, 1L, 1L, 1L,
    1L, 1L, 1L, 1L, 1L, 1L, 2L, 2L, 1L, 1L, 1L, 1L, 2L, 2L, 1L,
    1L, 1L, 1L, 2L, 1L, 2L, 2L, 2L), .Label = c("nao", "sim"), class =
"factor"),
    local = structure(c(1L, 1L, 2L, 1L, 1L, 1L, 1L, 1L, 2L, 1L,
    1L, 2L, 1L, 1L, 1L, 1L, 1L, 2L, 2L, 2L, 1L, 2L, 2L, 1L, 1L,
    1L, 1L, 1L, 1L, 2L, 2L, 2L), .Label = c("MG", "MS"), class = "factor"),
    est = structure(c(2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L,
    2L, 2L, 2L, 2L, 2L, 2L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L,
    1L, 1L, 1L, 1L, 1L, 1L, 1L), .Label = c("maduro", "vez"), class =
"factor"),
    A = structure(c(1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 2L, 2L, 2L,
    2L, 2L, 2L, 2L, 2L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 2L, 2L,
    2L, 2L, 2L, 2L, 2L, 2L), .Label = c("continuo", "repique"
    ), class = "factor"), H = c(4L, 4L, 4L, 4L, 8L, 8L, 8L, 8L,
    4L, 4L, 4L, 4L, 8L, 8L, 8L, 8L, 4L, 4L, 4L, 4L, 8L, 8L, 8L,
    8L, 4L, 4L, 4L, 4L, 8L, 8L, 8L, 8L), tempo = c(87L, 127L,
    35L, 100L, 59L, 27L, 30L, 64L, 44L, 31L, 52L, 75L, 40L, 63L,
    62L, 32L, 43L, 35L, 21L, 57L, 19L, 112L, 113L, 73L, 27L,
    24L, 29L, 51L, 41L, 50L, 39L, 88L), frutos.bons = c(114L,
    138L, 170L, 222L, 83L, 81L, 125L, 134L, 76L, 155L, 240L,
    189L, 55L, 295L, 281L, 369L, 74L, 67L, 126L, 214L, 62L, 10L,
    32L, 185L, 83L, 83L, 77L, 208L, 42L, 54L, 41L, 50L), Kg.frutos.bons =
c(5.9,
    7.6, 4.7, 10.8, 4.1, 5.2, 7.8, 5.6, 5.5, 8, 9.1, 4.8, 2.9,
    11, 13.2, 15.5, 4, 2.1, 5.1, 5.1, 2.7, 2.4, 2.5, 8.4, 3.2,
    4, 4.7, 9.9, 1.9, 2.5, 4.4, 5.7), colhidos = c(146L, 187L,
    189L, 288L, 110L, 113L, 128L, 180L, 148L, 162L, 249L, 246L,
    80L, 349L, 397L, 422L, 82L, 104L, 131L, 240L, 66L, 88L, 96L,
    235L, 84L, 91L, 97L, 258L, 50L, 109L, 204L, 250L), dleves = c(6L,
    30L, 12L, 37L, 14L, 24L, 3L, 24L, 51L, 5L, 5L, 50L, 22L,
    41L, 86L, 43L, 2L, 29L, 5L, 13L, 4L, 44L, 23L, 40L, 1L, 6L,
    18L, 20L, 6L, 39L, 101L, 48L), dgraves = c(26L, 19L, 7L,
    29L, 13L, 8L, 0L, 22L, 21L, 2L, 4L, 7L, 3L, 13L, 30L, 10L,
    6L, 8L, 0L, 13L, 0L, 34L, 41L, 10L, 0L, 2L, 2L, 30L, 2L,
    16L, 62L, 152L), naocolhidos = c(7L, 4L, 17L, 8L, 2L, 9L,
    0L, 16L, 10L, 3L, 8L, 23L, 2L, 8L, 4L, 1L, 5L, 4L, 1L, 9L,
    0L, 19L, 87L, 6L, 1L, 1L, 2L, 21L, 6L, 13L, 10L, 19L), carga = c(153L,
    191L, 206L, 296L, 112L, 122L, 128L, 196L, 158L, 165L, 257L,
    269L, 82L, 357L, 401L, 423L, 87L, 108L, 132L, 249L, 66L,
    107L, 183L, 241L, 85L, 92L, 99L, 279L, 56L, 122L, 214L, 269L
    ), tamanho = c(0.76, 0.84, 0.77, 0.97, 0.64, 0.71, 1.04,
    0.89, 0.94, 0.88, 0.86, 0.82, 0.81, 1, 0.95, 1.09, 0.83,
    0.74, 0.84, 0.63, 1.02, 0.54, 0.87, 0.86, 0.87, 0.79, 0.82,
    0.78, 0.74, 0.69, 0.57, 0.66), altura = c(2.4, 2.6, 3, 2.67,
    2.26, 2.36, 2.45, 2.98, 2.97, 2.39, 3.13, 2.28, 1.76, 2.66,
    2.51, 3.8, 3.52, 2.31, 2.86, 2.97, 2.39, 3.34, 3.42, 2.38,
    3.33, 3.02, 2.47, 3.46, 1.58, 3.56, 3.4, 3.71), cap = c(244.137931,
    215.4330709, 483.4285714, 388.8, 250.1694915, 693.3333333,
    936, 315, 450, 929.0322581, 630, 230.4, 261, 628.5714286,
    766.4516129, 1743.75, 334.8837209, 216, 874.2857143, 322.1052632,
    511.5789474, 77.14285714, 79.6460177, 414.2465753, 426.6666667,
    600, 583.4482759, 698.8235294, 166.8292683, 180, 406.1538462,
    233.1818182), ef = c(95.4248366, 97.90575916, 91.74757282,
    97.2972973, 98.21428571, 92.62295082, 100, 91.83673469, 93.67088608,
    98.18181818, 96.88715953, 91.44981413, 97.56097561, 97.75910364,
    99.00249377, 99.76359338, 94.25287356, 96.2962963, 99.24242424,
    96.38554217, 100, 82.24299065, 52.45901639, 97.51037344,
    98.82352941, 98.91304348, 97.97979798, 92.47311828, 89.28571429,
    89.3442623, 95.3271028, 92.93680297)), .Names = c("trat",
"cacho", "carret", "local", "est", "A", "H", "tempo", "frutos.bons",
"Kg.frutos.bons", "colhidos", "dleves", "dgraves", "naocolhidos",
"carga", "tamanho", "altura", "cap", "ef"), class = "data.frame", row.names
= c(NA,
-32L))


Na escuta,



CHRISTINA GRUPIONI
Engenheira Agrícola e Ambiental- CREA BA: 84142
*OCA (Organização Cooperativa de Agroecologia**)*
*Tecnologias Ecológicas e Sociais*
(31) 8863-0005, (31) 3892-2236
*skype:chrisgrupioni em gmail.com <chrisgrupioni em gmail.com>*
-------------- Próxima Parte ----------
Um anexo em HTML foi limpo...
URL: <http://listas.inf.ufpr.br/pipermail/r-br/attachments/20170206/0df56d41/attachment.html>


Mais detalhes sobre a lista de discussão R-br