Try this:

lapply(bb, function(x)quantile(x, c(0.25, 0.75)) - matrix(IQR(x) * c(1.5,
3), nrow = 2) %*% c(-1, 1))

On Wed, May 12, 2010 at 1:44 PM, n.vialma@libero.it <n.vialma@libero.it>wrote:

>
> Dear list,
> I'm trying to implement the following function, but what I get is an error
> message and I don't understand where is the error:
> #outliers'identification:
> iqr=lapply(bb,function(){
> inner_fencesl=quantile(x,0.25)-1.5*IQR(x)
> inner_fencesh=quantile(x,0.75)+1.5*IQR(x)
> outer_fencesl=quantile(x,0.25)-3*IQR(x)
> outer_fencesh=quantile(x,0.75)+3*IQR(x)})
> where bb is a dataframe containing all the variables over wich the function
> must be applied.
> thanks of your attention!
>
>        [[alternative HTML version deleted]]
>
> ______________________________________________
> 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.
>



-- 
Henrique Dallazuanna
Curitiba-Paraná-Brasil
25° 25' 40" S 49° 16' 22" O

	[[alternative HTML version deleted]]

