Displaying 20 results from an estimated 60000 matches similar to: "Isomorphic matrices"
2012 Nov 11
2
changing the signs in rows or columns in matrices and check them if they are identical
Dear R users,
i have this problem with matrices i want to check between two matrices if they are isomorphic i will give an example for what excactly i want
1 -1 1 -1 1 1
-1 1 -1 1 -1 -1
1 1 -1 1 1 -1
this two matrices are isomorphic beacause if i change the first 2 columns the matrices
2012 Oct 30
5
Swap rows and columns in a matrix
Dear R users,
I want a help to write an algorithm for swapping rows and columns in a matrix
thanks in advance
[[alternative HTML version deleted]]
2012 Oct 29
0
Check Isomorphism between matrices
I have 3003 16x5 submatrices from a hadamard matrice of 16x15. I want to write an algorithm that check all of these 3003 matrices if they are isomorphic and i want to find and keep the non-isomorphic ones. Any help will be welcome.
[[alternative HTML version deleted]]
2012 Nov 12
2
Selected matrices of an array and put into a list
Dear R users,
I have an array that has matrices that i want BB[16,5,2:27]
i want to put each of the 26 matrices into a List
thanks in advance
[[alternative HTML version deleted]]
2012 Nov 11
0
Changing the signs in rows or columns in matrices and check the matrices if they are identical
i have this problem with matrices i want to check between two matrices if they are isomorphic i will give an example for what excactly i want
1 -1 1 -1 1 1
-1 1 -1 1 -1 -1
1 1 -1 1 1 -1
this two matrices are isomorphic beacause if i change the first 2 columns the matrices are identical
2012 Nov 18
1
identical matrices
Dear R users,
I want to check matrices when i change the order of the rows or/and the order of the columns or/and the combination of them
i will give an example what i want
1 -1 1 1 1 1 1 1
-1 -1 -1 -1 -1 -1 -1 -1
1 1 1 1 1 -1 1 1
these 2 matrices are identical because i change the first row and make it third
1 -1 1 1 -1 1 1 1
-1 -1 -1
2012 Nov 13
2
multiply each row in a matrix with the help of the for loop
Dear R users,
I have this program
aa<-array(rep(0,27),dim=c(3,3,3))
a<-matrix(rep(1,9),ncol=3)
n<-0
for (i in 1:3) {
a[i,]<-a[i,]*(-1)
n<-n+1
aa[,,n]<-a[i,]
}
but i real want to multiply each row with -1 according to for loop and after that to put it in the array.
I will give an example for what excaclty want
-1 -1 -1
1 1 1
1 1 1
-1 -1 -1
-1
2012 Oct 30
2
Put submatrices in an array
Dear R users,
I have a Hadamard matrix 16x15 and i want to put 16x5 submatrices in an array put i have an error.
> A1<-matrix(c(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+ 1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,
+ 0,1,1,0,0,1,1,0,0,1,1,0,0,1,1,
+ 1,1,0,0,1,1,0,0,1,1,0,0,1,1,0,
+ 0,0,0,1,1,1,1,0,0,0,0,1,1,1,1,
+ 1,0,1,1,0,1,0,0,1,0,1,1,0,1,0,
+ 0,1,1,1,1,0,0,0,0,1,1,1,1,0,0,
+ 1,1,0,1,0,0,1,0,1,1,0,1,0,0,1,
+
2012 Nov 05
3
Error message
Dear R users,
I have this problem with memory i guess
AA<-array(rep(0,96096000),dim=c(16,5,3003,400))
Error: cannot allocate vector of size 733.2 Mb
can anyone help me,
Thanks in advance...
[[alternative HTML version deleted]]
2009 Sep 19
1
Converting matrices into row vectors and saving as ASCII text
Hi
I have some data with these dimensions:
5 3 100
which correspond to the x, y, and time dimensions, for a variable, p.
I need the data in this format: 100 rows (1 row per time unit), and 15
values in each row.
I have attempted to reshape my data
>dim(data)
5 3 100
>attr(data,'dim')<-c(dim(data)[3],dim(data)[1]*dimdata[2])
So I get data with 100 rows, 15 columns.
I need
2012 Feb 13
1
non-isomorphic sequences
Dear All,
Sorry for the typoes earlier, let me repost the question.
Suppose I want to generate sequences of length 3 from two symbols {1,2}, we get the following 8 sequences
1 1 1
1 1 2
1 2 1
1 2 2
2 1 1
2 1 2
2 2 1
2 2 2
However, I do not want all these 8 sequences. I call two sequencs to be isomorphic if one sequence could be obtained from the other by relabelling the symbols. For example,
2024 Jun 26
1
rbind() on zero row matrices is inconsistent
The help for cbind() and rbind() says
"For cbind (rbind), vectors of zero length (including NULL) are ignored
unless the result would have zero rows (columns), for S compatibility.
(Zero-extent matrices do not occur in S3 and are not ignored in R.)"
This leads to an inconsistency.
M <- matrix(NA, 0, 0) # Make a 0x0 matrix
N <- matrix(NA, 0, 1) # Make a 0x1 matrix
2007 Aug 09
1
How to apply functions over rows of multiple matrices
Dear ExpRts,
I would like to perform a function with two arguments
over the rows of two matrices. There are a couple of
*applys (including mApply in Hmisc) but I haven't found
out how to do it straightforward.
Applying to row indices works, but looks like a poor hack
to me:
sens <- function(test, gold) {
if (any(gold==1)) {
sum(test[which(gold==1)]/sum(which(gold==1)))
} else NA
}
2009 Aug 22
3
Help on comparing two matrices
Hi,
I need to compare two matrices with each other. If you can get one of
them out of the other one by resorting the rows and/or the columns, then
both of them are equal, otherwise they're not. A matrix could look like
this:
[,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8]
[1,] 0 1 1 1 0 1 1 0
[2,] 1 1 0 0 0 1 0 1
[3,] 1 0 1 0 0
2005 Apr 29
0
handling of zero and negative indices in src/main/subscript.c:mat2indsub() (PR#7824)
This message contains a description of what looks like a bug, examples
of the suspect behavior, a proposed change to the C code to change this
behavior, example of behavior with the fix, and suggestions for 3 places
to update the documentation to reflect the proposed behavior. It is
submitted for consideration for inclusion in R. Comments are requested.
Currently, the code for subscripting
2005 May 06
0
(PR#7824) handling of zero and negative indices in
I've put this in (with some different wording). Although S blithely
accepts mis-dimensioned index matrices I agree this is wrong and have made
it an error.
On Fri, 29 Apr 2005 tplate@acm.org wrote:
> This message contains a description of what looks like a bug, examples
> of the suspect behavior, a proposed change to the C code to change this
> behavior, example of behavior with
2007 Aug 10
1
[Fwd: Re: How to apply functions over rows of multiple matrices]
[Apologies to Gabor, who I sent a personal copy of the reply
erroneously instead of posting to List directly]
[...]
> Perhaps what you really intend is to
> take the average over those elements in each row of the first matrix
which correspond to 1's in the second in the corresponding
> row of the second. In that case its just:
>
> rowSums(newtest * goldstandard) /
2007 Oct 09
1
Handling two lists of matrices
I'm having trouble setting up the function call to handle two lists of
matrices. Each list has 6 matrices - Each matrix is 20x10. I need to
do some basic math on corresponding matrices in each list.
Here are some outputs of these lists, etc...
# first list
> length(qc.pm)
[1] 6
> dim(qc.pm[[1]])
[1] 20 10
> qc.pm[[1]][1:4,1:4]
441-JP071707.CEL 442-JP071707.CEL
2007 Apr 26
1
comparing two matrices, row by row
Estimated people,
I have two matrices:
ar1 <- array(data=c(1:16),dim=c(4,4))
ar2 <- array(data=c(1,2,3,3,5:16),dim=c(4,4))
They only differ in the fourth row. I would like to compare them in order to know which columns are equal.
The following works, but I would like to have a better solution, and not to use what someone called "prehistorical loops":
for(i in
2010 Apr 27
5
get means of elements of 5 matrices in a list
I've got a list of 5 matrices that are each 5 x 6. I'd like to end up with a
5 x 6 matrix that contains the mean value of the 5 original matrices. I can
do this by brute force, but there must be a better way than making each
matrix into a vector and then remaking a matrix
thanks very much for any help
david freedman
ll=list(structure(c(9.7, 17.6, 20.8, 24.1, 33.8, 14.5, 25.7, 29.8,