Dear José,
Here is one way:
# aux. function
foo <- function(x, ...){
m <- mean(x, ...)
S <- sd(x, ...)
x > m + S
}
# result
iris$rule <- with(iris, ave(Petal.Width, list(Species), FUN = foo))
head(iris)
HTH,
Jorge.-
On Thu, May 3, 2012 at 5:19 P
Hi everyone,
I would like to identify the case by groups that is just bigger that
avg plus sd. For example, using species as group and petal.wid as my
variable in the iris data.
What's the better way to doit? creating a function?
So,the question is to identify the single element of each species
2 matches
Mail list logo