require(reshape) cast(data, first+second~ ., sum)
Nikhil Kaza Asst. Professor, City and Regional Planning University of North Carolina nikhil.l...@gmail.com On Jun 29, 2010, at 3:05 PM, Yi wrote:
first=c('u','b','e','k','j','c','u','f','c','e') second = c ('usa ','Brazil ','England','Korea','Japan','China','usa','France','China','England') third=1:10 data=data.frame(first,second,third)
______________________________________________ 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.