Re: [R] Problem with a Matrix

2012-03-08 Thread John Kane
I think this is what you want. library(reshape2) dcast( xx, Site.No ~ Plant.Name) John Kane Kingston ON Canada > -Original Message- > From: medo_bot...@hotmail.com > Sent: Thu, 8 Mar 2012 01:20:42 -0800 (PST) > To: r-help@r-project.org > Subject: [R] Problem with a Matrix > > Dear All,

Re: [R] Problem with a Matrix

2012-03-08 Thread Hamada Elsayed Ali
Hi Petr, Finally, I got the solution like you explained and I find another one like the following: Cover <- tapply(cover[,3], cover[, c(1,2)], c) It is working great. Thanks for your help, Hamada -- View this message in context: http://r.789695.n4.nabble.com/Problem-with-a-Matrix-tp4455954p44

Re: [R] Problem with a Matrix

2012-03-08 Thread Petr PIKAL
Hi > > Dear All, > > I have a problem in making a matrix from a data. I did a summary data from a > big data frame using (ddply), the resulting table is like that: > > Site.NoPlant.NameCover.Percentage > 1XXX15 > 1YYY 20 >