Thursday, April 4, 2013

creating voilin plot / box plot in Excel, using REcel (with KMggplot2 plugins)

See the related posts on RExcel (for basic, Excel 2003 and Excel 2007) for basic information.

We discussed how we can use RExcel in previous posts. By implementing RExcel we generate voilin plots (alternative to box plot in look)

(1) First load R and then R commander to see R menu in Excel (see previous posts)

(2) Following example uses dataset cabages from the R dataset library. Load the data.

(3) KMggplot2 (unlike other menus is not activated as such), you need to go to tools and then click Load Pug-ins and then select RcmdrPlugin.KMggplot2. It will promt you to restart Rcmcdr click OK. Now you can see a menu with KMggplot2 in your RExcel menus.

(4)  Now under KMggplot2 menu click Box plot / Voilin plot / Confidence interval. You can then choose volin or box plot. Pick X and Y variable. X variable can be more than one, if you want to create multi-faceted trallis plot.

So you got your volin plot.

You can produce boxplot instead, just change plot type (perhaps using different grouping structure):

Happy plotting !!

No comments:

Post a Comment