function(x) {
q1 = quantile(x)[2]
q3 = quantile(x)[4]
iqr = q3 -q1
upper = q3+1.5*iqr
lower = q1-1.5*iqr
##Trim upper and lower
up = max(x[x < upper])
lo = min(x[x > lower])
return(c(lo, up))
}
in the box instead of get_tails.
Best,
Ian
Sure, you can just put:function(x) {
q1 = quantile(x)[2]
q3 = quantile(x)[4]
iqr = q3 -q1
upper = q3+1.5*iqr
lower = q1-1.5*iqr##Trim upper and lower
up = max(x[x < upper])
lo = min(x[x > lower])return(c(lo, up))
}in the box instead of get_tails.
Best,
Ian