that is a great suggestion ! thanks a lot Jim !


On Fri, Feb 14, 2014 at 1:14 AM, Jim Lemon <jim@bitwrit.com.au> wrote:

> On 02/14/2014 08:08 PM, Bogdan Tanasa wrote:
>
>> thank you Jim ...the idea behind would be to subset a set of values ?
>>
>> I would need to automate it the display for a list of numbers (1,2,3,,
>> ...,1000) where I would need to remove some values above an arbitrary
>> threshold (let's say 700),
>> but keep the same median as in the initial dataset.
>>
>>  That is a bit more complicated. I would suggest then getting the median
> separately and plugging it into the boxplot of the reduced data:
>
> x_median<-median(x)
> x_box<-boxplot(x,plot=FALSE)
> # drop the outliers
> x<-x[x<100]
> # get the boxplot stats for the reduced data
> x_box<-boxplot(x,plot=FALSE)
> # put the old median back in
> x_box$stats[3]<-x_median
> bxp(x_box)
>
> Again, because you have altered the stats passed to bxp, this is not a
> "true" boxplot.
>
> Jim
>

	[[alternative HTML version deleted]]


