Re: [R] request: How to combine three matrices in the desired form

2008-10-30 Thread Muhammad Azam
Dear Jim Thanks a lot for such a nice solution. best regards M.Azam From: Jim Lemon <[EMAIL PROTECTED]> Cc: R Help Sent: Thursday, October 30, 2008 10:06:57 AM Subject: Re: [R] request: How to combine three matrices in the desired form Hi Muhammad, Tr

Re: [R] request: How to combine three matrices in the desired form

2008-10-30 Thread Jim Lemon
Hi Muhammad, Try this: cbind(matrix(paste(var,"(",val,")",sep=""),nrow=4),as.character(nod)) Jim __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.h

[R] request: How to combine three matrices in the desired form

2008-10-30 Thread Muhammad Azam
Dear R-friends I have three matrices e.g. var <- matrix(c(4,4,4,4,0,4,4,4,0,3,3,0),nrow=4); val <- matrix(c(0.6,0.6,0.6,0.6,0,1.6,1.6,1.6,0,4.9,4.9,0),nrow=4); nod <- matrix(c(-1,-1,1,1),ncol=1) > var [,1] [,2] [,3] [1,]400 [2,]443 [3,]443 [4,]44