:78 Function create_function() is deprecated [8192]

small adjustement for positioning histogram

Marcelo Ponce [2018-10-18 16:40:21]
small adjustement for positioning histogram
Filename
plottingTools.R
diff --git a/plottingTools.R b/plottingTools.R
index 264af76..6766e99 100644
--- a/plottingTools.R
+++ b/plottingTools.R
@@ -32,7 +32,7 @@ plotMC <- function(NS,probs, wHist=T) {
 	# add inset figure with a histogram
 	if (wHist) {
 		# figure out where to place inset
-		if ( (convP-probs[1]) < 0 ) {
+		if ( (convP-mean(probs[1:2])) < 0 ) {
 			# mean below 1st value, inset above
 			par(fig = c(0.47,1, 0.5, 1), new = T)
 		} else {
ViewGit