Re: [R] How to transform the Matrix into the way I want it ???

2009-11-09 Thread William Dunlap
-Original Message- From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On Behalf Of Hongwei Dong Sent: Monday, November 09, 2009 2:24 PM To: R-help Forum Subject: [R] How to transform the Matrix into the way I want it ??? Hi, R users, I'm trying to

Re: [R] How to transform the Matrix into the way I want it ???

2009-11-09 Thread Nikhil Kaza
This is not an answer to your question, but I have used SparseM package to represent large travel time matrices efficiently. ?as.matrix.ssr if the traveltime matrix is symmetric. On 9 Nov 2009, at 5:24PM, Hongwei Dong wrote: Hi, R users, I'm trying to transform a matrix A into B (see

Re: [R] How to transform the Matrix into the way I want it ???

2009-11-09 Thread David Winsemius
On Nov 9, 2009, at 5:24 PM, Hongwei Dong wrote: Hi, R users, I'm trying to transform a matrix A into B (see below). Anyone knows how to do it in R? Thanks. Matrix A (zone to zone travel time) zone z1 z2 z3 z1 0 2.9 4.3 z2 2.9 0 2.5 z3 4.3 2.5 0 ztz - read.table(textConnection( z1 z2