Revision 4c9961af6c3e72b611474c0722c9262fb871ad46 authored by Matthias Templ on 05 July 2010, 18:25:41 UTC, committed by cran-robot on 05 July 2010, 18:25:41 UTC
1 parent b66ed0e
robVariation.R
`robVariation` <-
function(x, robust=TRUE){
rvars <- matrix(0, ncol=ncol(x), nrow=ncol(x))
if(robust){
for( i in 1:ncol(x)){
for( j in 1:ncol(x)){
if( i < j ) rvars[i,j] <- (mad(log(x[,i]/x[,j])))^2
}
}
} else{
for( i in 1:ncol(x)){
for( j in 1:ncol(x)){
if( i < j ) rvars[i,j] <- (var(log(x[,i]/x[,j])))^2
}
}
}
invisible(rvars)
}
![swh spinner](/static/img/swh-spinner.gif)
Computing file changes ...