R language Access Menu

Graphical representation of 2 numeric groups

Easiest way to represent two series of numbers graphically is by boxplots: 

Code:

    > ggplot(bwdf, aes(x=low, y=age))+ geom_boxplot(notch=T)

               

The notches indicate confidence interval of the medians. If the notches are not overlapping, it indicates confidence intervals do not overlap and hence the difference between 2 groups is significant.

Two density curves can also be plotted to show differences: 

Code:

    > ggplot(bwdf, aes(x=age, col=low))+ geom_density()

                       


    Comments & Feedback