search for: final_matrix

Displaying 3 results from an estimated 3 matches for "final_matrix".

2007 Nov 12
1
help in long loops
hi, please help me out in the following case. seems like it stuck in some where(already 7 hrs passed). what I want is to combine 4 matrix in to one matrix of desired length. final_matrix<-function(ob_feat,content_feat,link_feat,link_feat_transformed){ complete_feat<-matrix(rep(-1),nrow=11402,ncol=278) for(i in 1:8944) {q<-c(0) for(j in 1:11402) { if(as.matrix(content_feat[i,2])==as.matrix(ob_feat[j,2])) {complete_feat[i,1]=as.matrix(ob...
2009 Dec 06
2
Error in eval(expr, envir, enclos) : object 'N' not found
...E-2, gamma=9E-1, Kc=6E-1, Kn=6E-1, p=2E-11, a1=1.2E4, a2=7.5E8, Vm=0 ) tout <- seq(0, num_days, by=interval_size) state <- c(T = pars$Tini, N = pars$Nini, C = pars$Cini, M = pars$Mini) out <- lsoda(state, tout, model, pars) ## Finding position at which OF function is reached final_matrix = out; loopsize = (num_days / interval_size) + 1 OF_tumor_size = iniT + (OF_prcnt * iniT) ## Sentinel Value to find at which row in the matrix reaches OF_tumor_size OF_row=-1; for(i in 1:loopsize) { if( out[i,2] >= OF_tumor_size) { OF_row=i; break; } } if(OF_row != -1) { ##Para...
2013 Feb 13
5
spearman correlation and p-value as a matrix
...75Jun11 0.000000 0 0.000000 0 0.000000 0 0 0 0.000000 0 0 0 0 0 0.000000 0 0.000000 > Gi50Jun11 0.000000 0 0.000000 0 0.000000 0 0 0 0.000000 0 0 0 0 0 0.000000 0 0.000000 ag <- read.table (file.choose(), header=T, row.names) for (i in 1:(ncol(bg))) for (j in 1:(ncol(ag))) print(c(i,j)) final_matrix <- matrix(rep("0",ncol(bg)*ncol(ag)),ncol=ncol(bg),nrow=ncol(ag)) cor <- cor.test(as.vector(as.matrix(bg[,i])),as.vector(as.matrix(ag[,j])), method="spearman") #but the output is not matrice with all the values but a single correlation value data: bg[, i] and ag[, j]...