[R] ggplot and boxplots

Yectli Huerta huertaya at protonmail.com
Mon Mar 12 21:28:13 CET 2018


Hi,

I was wondering if someone could give me a hint or two. I'm having problems generating ggplot2 boxplots . The plot that is has dots but no boxplots. Below is the dataset

> testing_ggplot
    V1        V2     V3
1  256  Disabled 688.61
2  256  Disabled 698.63
3  256  Disabled 700.02
4  256  Disabled 693.36
5  256  Disabled  688.8
6  256  Disabled 697.72
7  256  Disabled 698.15
8  256  Disabled 693.98
9  256  Disabled 700.75
...
16 256   Enabled 698.35
17 256   Enabled 694.71
18 256   Enabled 705.53
19 256   Enabled 708.61
20 256   Enabled 693.33
...
32 272  Disabled 690.79

33 272  Disabled 687.14
34 272  Disabled 684.92
35 272  Disabled 687.87
36 272  Disabled 687.33
37 272   Enabled 696.22
38 272   Enabled 700.61
39 272   Enabled  695.2
40 272   Enabled 697.46
41 272   Enabled 696.83
...

This command for some reason, fails to generate a boxplot
> ggplot(testing_ggplot,aes(factor(V2),V3))+geom_boxplot() +facet_wrap(~as.factor(V1))

I don't seem to figure out what is wrong with the ggplot command I'm using. I attached a png with the generated plot

thanks,

yh
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ggplot.png
Type: image/png
Size: 62358 bytes
Desc: not available
URL: <https://stat.ethz.ch/pipermail/r-help/attachments/20180312/0f630327/attachment.png>


More information about the R-help mailing list