search for: 3x3

Displaying 20 results from an estimated 130 matches for "3x3".

Did you mean: 33
2012 Mar 28
6
How to get all possible combinations?
Dear all, suppose I have a vector with elements as: Vec <- c(2,3,4,5,6) Now I want to have all possible combination of length 3 using those elements and without any repetition. Like, I want to have 1 possibility like 2-3-4 but not 3-2-4. Can somebody guide me how to achieve that in R? Thanks for your help.
2011 May 10
1
Saving multiple 3x3 TIFF graphics inside a loop
Dear Friends, I have been trying to save multiple 3x3 (mfrow=c(3,3) graphics inside a loop using tiff figure format (not using PDF or savePlot functions) with no success. Could you please help? Here is a simplified example code: dat=data.frame (ID=rep(1:10,each=10),IDV=rep(seq(1:10),times=10)) dat$DV <- with(dat, 50+15*IDV) dat=dat[order(dat$...
2010 Jan 14
5
To add text in a matrix
Dear colleagues, I would need to add text (some rows of information) in a matrix. For example, given this matrix 1 2 3 4 5 6 7 8 9 I would need to add this info: THIS IS AN EXAMPLE OF a 3x3 MATRIX 1 2 3 4 5 6 7 8 9 I have been looking for a function that works similar to "fopen" in matlab, but unfortunately I have not found It in R. Thank you in advance for your help! Carlos Fernandez
2008 Nov 13
2
CROSSTABULATION
I want to form a 3x3 crosstabulation for the signs of two vectors (i.e. Negative, Zero, Positive). The problem is that I am simulating the data so for some iterations one of the categories is absent. Thus the resulting table shrinks to 3x2. I want it to be 3x3 with zero column corresponding to the missing category. Mor...
2006 Mar 10
1
what's wrong with my "cov"?
Hi all, Why cov(y, y) only gives one value, and cov(t(y), t(y)) gives 3x3 NA matrix? Here my y is listed below and it is a 3x1 matrix. I am expecting that if I have a random vector y=[y1 y2 y3]', here " ' " denotes a transposition so that y is a column vector, where y1, y2, y3 are independent random variables... then cov(y, y) should be E[ y * y...
2010 Mar 18
2
how to take multiple subsets from a matrix
useR's I have a matrix from which I want to take multiple subsets from, according to a particular scheme I will now describe. The matrix below (mat) is 5x5, and I want to take 9 subsets of it, each of dimension 3x3. The best way to explain what the result should look like is with the following: > dat <- c(3,6,1,9,12,9,2,10,6,5,3,13,1,4,8,9,4,6,10,11,2,7,3,5,10) > miss <- c(2,8,10,16,23) > dat[miss] <- NA > mat <- matrix(dat,5,5) > mat [,1] [,2] [,3] [,4] [,5] [1,] 3 9...
2003 Oct 06
1
visualizing transition probability matrices
Dear List, I have a couple of (~200) 3x3 transition probability matrices (ie each defines a Markov chain). They are all estimated from the same underlying process, so it ie meaningful to take their elemetwise mean and standard deviation. [1] First question: supposing that they are given in a list l, how do I get their elementwise mean an...
2013 Aug 28
1
Welcome to the "R-help" mailing list
...50 Now I'm wondering how can I perform the analysis for 3 genes (and construct the contigency table), as follows: Gene A mutated, Gene A normal, Gene B mutated, Gene B normal, Gene C mutated and Gene C normal. How do I perform a fisher test using fisher.test( ) function using this data (3x3 contigency table)?Can someone help me ? [[alternative HTML version deleted]]
2005 Nov 09
6
elements in a matrix to a vector
hi all, i'm trying to get elements in a matrix into a vector. i need a "streamlined" way to do it as the way i'm doing it is not very serviceable. an example is a 3x3 matrix like 0 0 3 2 0 0 0 4 0 to a vector like 3 2 4 thanks...mj [[alternative HTML version deleted]]
2005 Dec 16
2
multiple plots per page
R-help, I would like to place nine (3X3) plots per page. I am not properly implement mfrow(3,3) in the script below: jpeg("xyplot.jpg") #names output file my_args <- commandArgs() #sets up to take args from dos batch command mfcol(3,3) #set page for 3X3 TEMPS <- c(-15,25,85)#list of temps VBATS <- c(3,3.6,4.7)#list o...
2010 Oct 04
1
Fisher exact test?
...the first pick, 'B' number of genes in the second pick, and 'C' number of genes in the third pick, I would want to calculate p(n) where n = (A intersection B intersection C). Would fisher exact test be the correct method to evaluate the probability? And if so how can I frame the 3x3 (?) contingency table? I can find numerous examples of 2x2 tables, but none for 3x3. Any guidance would be appreciated. many thanks. [[alternative HTML version deleted]]
2010 Oct 31
1
How to control in order of groups in xyplot
Hi guys, I used the following R code to generate one plot library(lattice) xyplot(Y~X1|as.factor(X2)*as.factor(X3), groups = as.factor(X4), data=mydata) Both X2 and X3 have three values. X4 has two values. I got 3x3 grids and in each grid there are two curves about y~x1 for the two X4 values. I am quite happy with the plot except that I need a different layout of the 3x3 layout. For example, X2={"m=2", "m=5", and "m=10"} and it plots with the order "m=10", "m=2&quot...
2010 Jul 07
1
xyplot of function only shows diagonal plots
...s")) x <- seq(-4,4, by=0.1) # case 1x1 a <- c( 1 ) b <- c( 3 ) trel_1 <- xyplot(f(x,a,b) ~ x | a * b, , type = "l", main = "1x1", ylab = "f(x)", xlab = "x", xlim = c(-6,6), ylim = c(-6,6), ) # case 3x3 a <- c(1,2,3) b <- c(1,2,3) trel_3 <- xyplot(f(x,a,b) ~ x | a * b, , type = "l", main = "3x3", ylab = "f(x)", xlab = "x", xlim = c(-6,6), ylim = c(-6,6), ) print(trel_3) #print(trel_1) --- en...
2007 Sep 05
3
list element to matrix
I have created a list of "matrices" using sapply or lapply and wish to extract each of the "matrices" as a matrix. Some of them are 2x2, 3x3, etc. I can do this one at a time as: M1<-as.matrix(D[[1]]) How can repeat this process for an unknown number of entries in the list? In other words, how shall I index M1? Diana
2015 Jan 29
3
pregunta
Estimados Para analizar tres muestras cualitativas independientes se utiliza Cochran-Mantel-Haenszel test ?Cual script es el adecuado para analizar tres variables dependientes? en MCNEMAR solo se permite analizar dos variables cualitaticvas dependientes saludos José [[alternative HTML version deleted]]
2016 Feb 17
2
Openswan <-> VyOS
...yOS configuration is posted in the above forum post, except now I have followed their advice and created 20 tunnels (each subnet to each subnet, if that makes sense). However, when I enabled this, I got the following errors on the Openswan server: Feb 18 01:24:27 OPENSWAN pluto[8010]: "VYOS/3x3" #70: next payload type of ISAKMP Hash Payload has an unknown value: 243 Feb 18 01:24:27 OPENSWAN pluto[8010]: "VYOS/3x3" #70: malformed payload in packet Feb 18 01:24:27 OPENSWAN pluto[8010]: "VYOS/3x3" #70: sending notification PAYLOAD_MALFORMED to <VYOS IP>:500 Feb...
2010 Apr 23
3
reordering of matrix rows to maximize the sum of the diagonal
Hi r-help community, This question isn't so much a syntax/coding one, but here goes: Let's say I have matrix of arbitrary dimensions and I'd like to reorder the rows in such a way that I could maximize the sum of the entries along the diagonal. For example, for this 3x3 matrix: [,1] [,2] [,3] [1,] 3 4 13 [2,] 9 1 2 [3,] 2 11 1 rearranging the rows to maximize the sum along the diagonal would produce this matrix: [,1] [,2] [,3] [1,] 9 1 2 [2,] 2 11 1 [3,] 3 4 13 I've been experimenting with some...
2008 May 14
4
Newbie question about vector matrix multiplication
...0.0002570286 0.0002117336 Z 0.0007887114 0.0002117336 0.0009168750 And a weight vector generated by w<- read.table("c:/r.weights") X Y Z 1 0.5818416 0.2158531 0.2023053 I want to compute the product of the matrix and vectors termwise to generate a 3x3 matrix, where m[i,j]=w[i]*co[i,j]*w[j]. 0.000423773 7.47216E-08 4.41255E-08 7.47216E-08 1.96566E-11 4.29229E-11 4.41255E-08 4.29229E-11 4.11045E-11 Is this possible without writing explicit loops? Thank you, Dan Stanger Eaton Vance Management 200 State Street Boston, MA 02109 617 598 8261...
2010 Aug 31
3
"mode" function
...have unable to find the answer for it either in the R-manual or by browsing the web. I would like to know if there is a "mode" function in R, such that from a vector or matrix the function returns the most common value. In other programs I use (such as Matlab) I can have for exampe a 3X3 matrix A, A=[1 2 3; 1 3 2; 3 3 2] and I can find the mode of the rows so that mode(A[1:3,:]) returns a 1X3 matrix [1 3 2]. Is this possible in R as well? If not, how would one go about this? Thank you very much, Bill [[alternative HTML version deleted]]
2003 May 16
4
Newbie hung up with matrices
...ust started learning R. I'm trying to use the Help and the downloadable manuals. I am stuck on trying to multiply matrices. Can anyone please supply a couple of lines of code that I can plug into a fresh console to see how a double precision (1x3) matrix is multiplied by a double precision (3x3) matrix? I keep getting an error message,"Error in x%*%A: requires numeric matrix/vector arguments". I have some VBA and VB experience (thus a little Object Oriented programming experience), am I right in beliving that I am not "dimensioning" correctly? I have been trying th...