On Wed, Mar 23, 2011 at 11:13 AM, Zablone Owiti <zow...@ncst.go.ke> wrote: > Dear users, > > I wish to convert a column of data containing pentad (5day mean data) > from 1962 - 2000 into rows with each row having 73 values (ie. 73 pentads > per year). > > > > 1962 pent1 pent2 ............pent73 > > . > . > . > . > > 2000 pent1 pent2 ..............pent73 > > > What commands should I use to achieve this? > > Thanks >
my.pentads<-paste(rep(1962:2000, each=73), 1:73) # generate sample data matrix(my.pentads, ncol=73, byrow=TRUE) > > > ---------------------------- > > ZABLONE OWITI > > GRADUATE STUDENT > > College of Atmospheric Science > > Nanjing University of Information, Science and Technology > > Add: 219 Ning Liu Rd, Nanjing, Jiangsu, 21004, P.R. China > > Tel: +86-25-58731402 > > Fax: +86-25-58731456 > Mob. 15077895632 > Website: www.nuist.edu.cn > > ==================================================== > > DO NOT PRINT THIS E-MAIL UNLESS NECESSARY. THE ENVIRONMENT CONCERNS US > ALL. > > ______________________________________________ > 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.