search for: mat4

Displaying 11 results from an estimated 11 matches for "mat4".

Did you mean: mat
2023 Jan 27
3
implicit loop for nested list
...r.mat <- matrix(rnorm(16), nrow = 4) > list(two.mat = two.mat, four.mat = four.mat) #results with different dimensions > }) > > #Collect different components of simulation results > #Is it possible to do this with implicit loops? > mat2 <- matrix(nrow = 2, ncol = 1) > mat4 <- matrix(nrow = 4, ncol = 1) > for (mat.list in mysim) { > mat2 <- cbind(mat2, mat.list[["two.mat"]]) > mat4 <- cbind(mat4, mat.list[["four.mat"]]) > } > mat2 <- mat2[,-1] > mat4 <- mat4[,-1]
2012 Jun 14
0
fixed trimmed mean for j-group
...5 n4=15 miu=0 sd1=1 sd2=1 sd3=1 sd4=1 a=rnorm(n1,miu,sd1) b=rnorm(n2,miu,sd2) c=rnorm(n3,miu,sd3) d=rnorm(n4,miu,sd4) ## data transformation g=0 h=0 w<-a*exp(h*a^2/2) x<-b*exp(h*b^2/2) y<-c*exp(h*c^2/2) z<-d*exp(h*d^2/2) mat1<-sort(w) mat2<-sort(x) mat3<-sort(y) mat4<-sort(z) alpha=0.15 k1=floor(alpha*n1)+1 k2=floor(alpha*n2)+1 k3=floor(alpha*n3)+1 k4=floor(alpha*n4)+1 r1=k1-(alpha*n1) r2=k2-(alpha*n2) r3=k3-(alpha*n3) r4=k4-(alpha*n4) ## j-group trimmed mean e1=k1+1 f1=n1-k1 e2=k2+1 f2=n2-k2 e3=k3+1 f3=n3-k3 e4=k4+1 f4=n4-k4 trim1=1/((1-2*alpha)*n1)...
2023 Jan 27
1
implicit loop for nested list
...= 4) > > list(two.mat = two.mat, four.mat = four.mat) #results with different dimensions > > }) > > > > #Collect different components of simulation results > > #Is it possible to do this with implicit loops? > > mat2 <- matrix(nrow = 2, ncol = 1) > > mat4 <- matrix(nrow = 4, ncol = 1) > > for (mat.list in mysim) { > > mat2 <- cbind(mat2, mat.list[["two.mat"]]) > > mat4 <- cbind(mat4, mat.list[["four.mat"]]) > > } > > mat2 <- mat2[,-1] > > mat4 <- mat4[,-1] > > _______...
2013 Feb 01
2
Nested loop and output help
...) a11 <- ifelse( X < cut1 & Y < cut2, 1, 0) a12 <- ifelse( X < cut1 & Y >= cut2, 1, 0) a21 <- ifelse( X >= cut1 & Y < cut2, 1, 0) a22 <- ifelse( X >= cut1 & Y >= cut2, 1, 0) mat3 <-matrix(c(sum(a11),sum(a21), sum(a12),sum(a22)), nrow = 2) mat4 <-matrix(c(sum(a11),sum(a22), sum(a12),sum(a21)), nrow = 2) out3a <- mcnemar.test(mat3, correct=FALSE) out3b <- mcnemar.test(mat3, correct=TRUE) out4a <- chisq.test(mat4, correct = FALSE) out4b <- chisq.test(mat4, correct = TRUE) print(mat1) print(mat2) print(cut1) print(cut2...
2012 Jul 07
0
fixed trimmed mean for group
...> g=0 > h=0 > > w<-a*exp(h*a^2/2) > x<-b*exp(h*b^2/2) > y<-c*exp(h*c^2/2) > z<-d*exp(h*d^2/2) > > mat1<-sort(w) > mat2<-sort(x) > mat3<-sort(y) > mat4<-sort(z) > > alpha=0.15 > k1=floor(alpha*n1)+1 > k2=floor(alpha*n2)+1 > k3=floor(alpha*n3)+1 > k4=floor(alpha*n4)+1 > > r1=k1-(alpha*n1) > r2=k2-(alpha*n2) > r3=k3-(alpha*n3) > r4=k4-(alpha*n...
2012 Apr 05
0
[LLVMdev] Difference between 2.9 and 3.0 in intel ASM printer
...ver, I've stumbled upon this. Using this: ; ModuleID = 'data.u' %window = type { %visobj, %vec2, %vec2, %vec2, %string, %color, i32, i32, %string, %string, %string, i1, i1, i1, i1, i1, i1, i32, i8* } %visobj = type { %object, i1, i1, i1, i1, %color, %vec4, %vec4, %vec4, %vec4, i32, %mat4, %mat4, %mat4, %mat4, %material*, %effect*, i32, i32, i32, float, i8, %visobj*, %vec3, %vec3, %vec3, %vec3, %vec3, %vec3, %quat, float, float, float, float, float, float, %map, i8* } %object = type { i8, i8, i8, i8, i8, i8, i8, i8, %string, %string, i8* } %string = type { i8* } %color = type { i8,...
2012 Nov 12
5
Matrix to data frame conversion
I have a matrix which I wanted to convert to a data frame. As I could not succeed and resorted to export to csv and reimport it again. Why did I fail in the attempt and how can I achieve what I wanted without this roundabouts? The original matrix: > str(comb_model0) num [1:90, 1:4] 3.5938 0.0274 0.0342 0.0135 0.0207 ... - attr(*, "dimnames")=List of 2 ..$ : chr [1:90]
2004 Sep 27
8
cannot assign dimnames
Dear list, If anyone knows how to assign dimnames to matrices or arrays I would be most grateful for help. I've tried various permutations of likely-looking code but get error messages every time. I could find no example in the documentation. Many thanks, Dan Bebber Department of Plant Sciences University of Oxford South Parks Road Oxford OX1 3RB UK Tel. 01865 275000
2013 Apr 24
2
Distance matrices Combinations
...ROBLEM IS A SMALL PIECE OF A REAL BIG AND A COMPLICATED PROBLEM. IF I DELIBERATE IN A VERY SIMPLE WAY THEN ALL I WANT IS TO PUT ALL THE POSSIBLE COMBINATIONS OF 75 DISTANCE MATRICES (BY TAKING 4 MATRICES, MORE COMMONLY 75C4), in the following equation. t<-as.matrix((MAT1)^2+(MAT2)^2+(MAT3)^2+(MAT4)^2+,upper=T,diag=T)) Then "1215450" values of "t"(one for each combination) should one by one be inculcated in the following loop(to calculate the "o" value) and in the end want those 10 combinations of distance matrices which have lowest "o" values. e <...
2010 Aug 25
3
approxfun-problems (yleft and yright ignored)
Dear all, I have run into a problem when running some code implemented in the Bioconductor panp-package (applied to my own expression data), whereby gene expression values of known true negative probesets (x) are interpolated onto present/absent p-values (y) between 0 and 1 using the *approxfun - function*{stats}; when I have used R version 2.8, everything had worked fine, however, after updating
2013 Feb 13
3
date and matrices
Hi Elisa, Try this: date1<-format(seq.Date(as.Date("1991.1.1",format="%Y.%m.%d"),as.Date("1996.12.31",format="%Y.%m.%d"),by="day"),"%Y.%m.%d") ?length(date1) #[1] 2192 mat1<-matrix(c(.314,.314,.273,.273,.236,.236,.236,.236,.273,.314,.403,.314),ncol=1) res1<-