Displaying 1 result from an estimated 1 matches for "filteredx".
Did you mean:
filtered
2005 Aug 09
2
How to pre-filter large amounts of data effectively
Hi,
I'm a R newbie and want to accelerate the following pre-filtering
step of a data set with more than 115,000 rows :
#-----------------
# Function to filter out constant data columns
filter.const<-function(X, vectors=c('column', 'row'), tol=0){
realdata=c()
filteredX<-matrix()
if( vectors[1] == 'row' ){
for( row in (1:nrow(X)) ){
if( length(which(X[row,]!=median(X[row,])))>tol ){
realdata[length(realdata)+1]=row
}
}
filteredX=X[realdata,]
} else if( vectors[1] == 'column' ){
for( col in (1:n...