[R] summing vectors/matrices

PIKAL Petr petr.pikal at precheza.cz
Fri Apr 5 14:31:58 CEST 2013


> -----Original Message-----
> From: r-help-bounces at r-project.org [mailto:r-help-bounces at r-
> project.org] On Behalf Of Nicolas L. Gutierrez
> Sent: Thursday, April 04, 2013 3:17 PM
> To: r-help at 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


can be a way to go.

If your data are in dataframe then you probably can use 


But without knowing data structure and desired result it is hard to tell anything definite.


>  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]]

More information about the R-help mailing list