Re: [R] Read data from .csv file as a matrix and compare the different between two matrix

2012-09-05 Thread Rui Barradas
Hello, Em 05-09-2012 07:26, David Winsemius escreveu: On Sep 4, 2012, at 4:39 PM, s.s.m. fauzi wrote: Hi, I have two table matrix, and I would like to compare the different between two matrix. For example: Matrix 1: A B C A 0 1 0 B 0 0 1 C 0 0 0 Matrix 2: A B C A 0 1 0 B 0 0 0

Re: [R] Read data from .csv file as a matrix and compare the different between two matrix

2012-09-04 Thread David Winsemius
On Sep 4, 2012, at 4:39 PM, s.s.m. fauzi wrote: > Hi, > I have two table matrix, and I would like to compare the different between > two matrix. > For example: > > Matrix 1: >A B C > A 0 1 0 > B 0 0 1 > C 0 0 0 > > Matrix 2: > A B C > A 0 1 0 > B 0 0 0 > C 0 0 0 > > Each column

Re: [R] Read data from .csv file as a matrix and compare the different between two matrix

2012-09-04 Thread arun
ion may not work in situations like the one I mentioned above. A.K. - Original Message - From: s.s.m. fauzi To: r-help@r-project.org Cc: Sent: Tuesday, September 4, 2012 7:39 PM Subject: [R] Read data from .csv file as a matrix and compare the different between two matrix Hi, I have two table ma

[R] Read data from .csv file as a matrix and compare the different between two matrix

2012-09-04 Thread s.s.m. fauzi
Hi, I have two table matrix, and I would like to compare the different between two matrix. For example: Matrix 1: A B C A 0 1 0 B 0 0 1 C 0 0 0 Matrix 2: A B C A 0 1 0 B 0 0 0 C 0 0 0 Each column which have value 1, should also return value 1. As in this case/example, the result

Re: [R] Read data from .csv file as a matrix

2010-05-05 Thread Tao Shi
Vincent, The root of this problem seems to be that you don't fully understand the differences between matrix and data.frame.  Read up on them and you'll know how to solve this problem. For now: as.matrix(temp[,-1]) or temp = read.csv("Weather.csv", sep=",", row.names=1) temp1 <- as.matrix(t

Re: [R] Read data from .csv file as a matrix

2010-05-05 Thread Nordlund, Dan (DSHS/RDA)
> -Original Message- > From: r-help-boun...@r-project.org [mailto:r-help-boun...@r- > project.org] On Behalf Of vincent.deluard > Sent: Wednesday, May 05, 2010 12:34 PM > To: r-help@r-project.org > Subject: [R] Read data from .csv file as a matrix > > > Hi R-

Re: [R] Read data from .csv file as a matrix

2010-05-05 Thread Erik Iverson
Hello, I have a csv file that contains weather observation (rows) by days (in columns). I open using: temp = read.csv("Weather.csv", sep=",") and read: X X1.Jan X2.Jan X3.Jan X4.Jan 1 Min 2 3 4 1 2 Max 6 10 8 6 3 F

[R] Read data from .csv file as a matrix

2010-05-05 Thread vincent.deluard
Hi R-users, I have a csv file that contains weather observation (rows) by days (in columns). I open using: > temp = read.csv("Weather.csv", sep=",") and read: X X1.Jan X2.Jan X3.Jan X4.Jan 1 Min 2 3 4 1 2 Max 6 10 8