R/cv.filter.R

cv.filter<-function(data, cutoff=0.05)
{
cv<-apply(data,1,function(x) sd(x)/mean(x))
co<-cutoff
plot(sort(cv), ylab="Coefficient of variation")
abline(h=co,col="red")
data<-data[cv>cutoff,]
return(data)
}

Try the MAMA package in your browser

Any scripts or data that you put into this service are public.

MAMA documentation built on Jan. 15, 2017, 3:05 p.m.