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
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
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
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
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
> -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-
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
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
8 matches
Mail list logo