Re: [R] matrix evaluation using if function

2011-05-01 Thread ivan
Hi, thank you very much, both methods worked perfectly. Regards On Fri, Apr 29, 2011 at 4:17 PM, Berend Hasselman wrote: > > David Winsemius wrote: > > > > On Apr 29, 2011, at 4:27 AM, ivan wrote: > > > >> Hi All, > >> > >> I am trying to create a function which evaluates whether the values >

Re: [R] matrix evaluation using if function

2011-04-29 Thread Berend Hasselman
David Winsemius wrote: > > On Apr 29, 2011, at 4:27 AM, ivan wrote: > >> Hi All, >> >> I am trying to create a function which evaluates whether the values >> (which >> are equal to one) of a matrix are the same as their mirror values. >> Consider >> the following matrix: >> >>> n<-matrix(cbi

Re: [R] matrix evaluation using if function

2011-04-29 Thread David Winsemius
On Apr 29, 2011, at 4:27 AM, ivan wrote: Hi All, I am trying to create a function which evaluates whether the values (which are equal to one) of a matrix are the same as their mirror values. Consider the following matrix: n<-matrix(cbind(c(0,1,1),c(1,0,0),c(0,1,0)),3,3) colnames(n)<-cbi

[R] matrix evaluation using if function

2011-04-29 Thread ivan
Hi All, I am trying to create a function which evaluates whether the values (which are equal to one) of a matrix are the same as their mirror values. Consider the following matrix: > n<-matrix(cbind(c(0,1,1),c(1,0,0),c(0,1,0)),3,3) > colnames(n)<-cbind("A","B","C");rownames(n)<-cbind("A","B","C")