From 80b0ba4a8d41adee65adf73bebed4bbef3c065c3 Mon Sep 17 00:00:00 2001 From: Alassane Samba Date: Wed, 29 Mar 2017 16:19:15 +0200 Subject: init TOM: machine learning on test results Change-Id: Ic66214e53d694bef9d4fac08a2ededa1f3ae4f82 Signed-off-by: Alassane Samba --- contrib/TOM/R/boostedBoxPlot.R | 64 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 64 insertions(+) create mode 100644 contrib/TOM/R/boostedBoxPlot.R (limited to 'contrib/TOM/R/boostedBoxPlot.R') diff --git a/contrib/TOM/R/boostedBoxPlot.R b/contrib/TOM/R/boostedBoxPlot.R new file mode 100644 index 00000000..c255864a --- /dev/null +++ b/contrib/TOM/R/boostedBoxPlot.R @@ -0,0 +1,64 @@ +# ----------------------------------------------------------------------------- +# title: Boosted Boxplots +# description: add several useful features to the classical R boxplot function +# author: Alassane Samba (alassane.samba@orange.com) +# Copyright (c) 2016 Orange +# All rights reserved. This program and the accompanying materials +# are made available under the terms of the Apache License, Version 2.0 +# which accompanies this distribution, and is available at +# http://www.apache.org/licenses/LICENSE-2.0 +# ----------------------------------------------------------------------------- +boostedBoxplot<-function(y,x, main="", labx=NULL,laby=NULL, plot.mean=T, text.freq=T, las=1, ylim=c(0,0), limitVisibleModalities=30, decreasing=NULL, dynamic=F){ + xlab="" + if(is.null(labx))labx=deparse(substitute(x)) + if(is.null(laby))laby=deparse(substitute(y)) + if(main==""){ + main=labx + }else{ + xlab=labx + } + x=droplevels(as.factor(x)) + p=length(levels(as.factor(x))) + if(!is.null(decreasing)){ + x=factor(x,levels = names(sort(tapply(y,x,median), decreasing = decreasing)), ordered = F) + }else{ + decreasing=T + } + #limitVisibleModalities + if(limitVisibleModalities