search for: mprob

Displaying 1 result from an estimated 1 matches for "mprob".

Did you mean: prob
2007 Jul 20
1
Column-mean-values for targeted rows
...es with 1) As a very fresh "programmer" I have build a simple function in R which should not be very efficient indeed! It works well for current-dimension matrices, but it just not goes so well in huge ones. meanprob<-function(Robj){ NLINE<-dim(Robj)[1]; NCOLUMN<-dim(Robj)[2]; mprob<-c(rep(0,(NCOLUMN-1))); for (i in 2:NCOLUMN){ sumprob<-0; pa<-0; for (j in 1:NLINE){ if(Robj[j,1]!=0){ pa<-pa+1; sumprob<-Robj[j,i]+sumprob; } } mprob[i-1]<-sumprob/pa; } return(mprob); } So I &qu...