Hi, No problem. Another method will be: library(reshape2) dcast(dat1,TYPE~VAL,value.var="AMOUNT") # TYPE BB BE BK BW BZ HH HR MN MT NK RR SL SM SN SZ UU #1 WASTE1 82 19 254 167 14 33 93 48 144 359 112 27 62 59 86 51 #2 WASTE2 11 2 60 46 NA 13 54 6 48 159 19 2 16 16 59 9 #3 WASTE3 15 16 33 23 5 3 15 4 27 72 5 9 6 16 20 10 A.K.
----- Original Message ----- From: Geophagus <f...@retposto.net> To: r-help@r-project.org Cc: Sent: Thursday, November 8, 2012 3:04 PM Subject: Re: [R] Regrouping dataframe Thank you very much! It works ! Best greetings GeO -- View this message in context: http://r.789695.n4.nabble.com/Regrouping-dataframe-tp4648927p4648956.html Sent from the R help mailing list archive at Nabble.com. ______________________________________________ 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.html and provide commented, minimal, self-contained, reproducible code. ______________________________________________ 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.html and provide commented, minimal, self-contained, reproducible code.