Seems like this should be easy but I'm struggling a bit. How do I rearrange a data frame to go from the first one to the second shown below ?
State Date lbs TX 200701 400 TX 200702 650 TX 200703 950 TX 200704 1000 FL 200701 200 FL 200702 300 FL 200703 500 FL 200704 333 NJ 200701 409 NJ 200702 308 NJ 200703 300 NJ 200704 800 Date TX FL NJ 200701 400 200 409 200702 650 300 308 200703 950 500 300 200704 1000 333 800 -- View this message in context: http://r.789695.n4.nabble.com/Reshaping-a-dataframe-tp4649874.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.