Hi > -----Original Message----- > From: r-help-boun...@r-project.org [mailto:r-help-bounces@r- > project.org] On Behalf Of Nicolas L. Gutierrez > Sent: Thursday, April 04, 2013 3:17 PM > To: r-help@r-project.org > Subject: [R] summing vectors/matrices > > Hi All, > > I have a large dataset I need to re-structure. It looks something like > this: > > > YearAreaQBinFD200011502000111012000111523200011201220001125120002151200 > 02110 > 62000211511200021201320002125320001250200012101200012152320001220122000 > 12251 > 20002251200022103200022151220002220132000222532001...2011
I cannot believe that your dataset does not have any delimiters. If it is really the case read.fwf can be a way to go. If your data are in dataframe then you probably can use aggregate But without knowing data structure and desired result it is hard to tell anything definite. Regards Petr > > And I need to create different vectors (Bin, FD) summing by year > and/or by area; For example, I need a new dataset: > Bin, FD[Year=2000,Area=1], FD[Year=2000,Area=2], FD[Year=2000], > FD[Year=2001,Area=1], etc. > Any help really appreciated!! > NG > > [[alternative HTML version deleted]] ______________________________________________ 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.