Re: [R] How may I add "is.outer" method

2009-04-12 Thread andrew
I am not quite sure how you define your outlier, but the definition
that I am familiar with is that an outlier is greater than 1.5*Inter
quartile range above the 3rd quartile or below the 1st quartile (this
is the default for the whiskers in boxplot).  This can be easily found
by

  x[(x < quantile(x)[2] - 1.5*IQR(x)) | (x > quantile(x)[4] + 1.5*IQR
(x))]

or if you prefer

  is.outlier <- function(x) {(x < quantile(x)[2] - 1.5*IQR(x)) | (x >
quantile(x)[4] + 1.5*IQR(x))}
  x[is.outlier(x)]

HTH.

Andrew.


On Apr 12, 8:51 am, Grześ  wrote:
> Hello
> I have a problem like this:
>
> > Glass$RI[is.outlier(Glass$RI)]
>
> Error: could not find function "is.outlier"
>
> Which commend I may add "is.outer" to my application?
>
> --
> View this message in 
> context:http://www.nabble.com/How-may-I-add-%22is.outer%22-method-tp23006216p...
> Sent from the R help mailing list archive at Nabble.com.
>
> __
> r-h...@r-project.org mailing listhttps://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guidehttp://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


[R] How may I add "is.outer" method

2009-04-12 Thread Grześ

Hello 
I have a problem like this:

> Glass$RI[is.outlier(Glass$RI)]
Error: could not find function "is.outlier"

Which commend I may add "is.outer" to my application?


-- 
View this message in context: 
http://www.nabble.com/How-may-I-add-%22is.outer%22-method-tp23006216p23006216.html
Sent from the R help mailing list archive at Nabble.com.

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.