From cb3262931100688c74c4b3683744529ceff74d00 Mon Sep 17 00:00:00 2001 From: Luka Stanisic Date: Thu, 20 Mar 2014 09:43:44 +0100 Subject: [PATCH] small fix to benchmarking code --- contrib/benchmarking_code_block/Rhist.R | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/contrib/benchmarking_code_block/Rhist.R b/contrib/benchmarking_code_block/Rhist.R index 884d3aecee..991060e2d2 100644 --- a/contrib/benchmarking_code_block/Rhist.R +++ b/contrib/benchmarking_code_block/Rhist.R @@ -65,15 +65,19 @@ for(i in unique(NAME)) if (length(vector1)==1) { #If there is only one element + h<-hist(vector1) # Just for R compatibility reasons h$breaks<-c(vector1,vector1) h$counts<-1 } else { if (type=="mean") - #Mean value only - h$breaks<-c(mean(vector1),mean(vector1)) - h$counts<-length(vector1) + { + #Mean value only + h<-hist(vector1) # Just for R compatibility reasons + h$breaks<-c(mean(vector1),mean(vector1)) + h$counts<-length(vector1) + } else if (type=="default") #Standard HISTOGRAM: -- 2.20.1