On 05/15/2013 04:15 PM, catalin roibu wrote:
Hello all! I have a problem with my data. My initial data is a list years and months (see below). I want to transpose my data (12 rows (months) and year values as column). I try t(spi3), but the year values do not appear as column names, but as values. Please help me to solve this problem!
Hi catalin, Try this: spi4<-data.frame(t(spi3[,-1])) names(spi4)<-spi3$year 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.html and provide commented, minimal, self-contained, reproducible code.