[R-sig-Geo] Cumulate space time data over days
Jue Lin-Ye
jl.iccp at gmail.com
Mon Jul 20 12:43:45 CEST 2015
On 20 July 2015 at 11:32, pierluigi de rosa <pierluigi.derosa at gmail.com>
wrote:
> I simply have a STFDF like I attached at the end of the mail.
>
> > summary(pioggieST1)
> Object of class STFDF
> with Dimensions (s, t, attr): (30, 8401, 1)
> [[Spatial:]]
> Object of class SpatialPointsDataFrame
> Coordinates:
> min max
> coords.x1 2272679 2320496
> coords.x2 4698989 4821088
> Is projected: TRUE
> proj4string :
> [+proj=tmerc +lat_0=0 +lon_0=15 +k=0.9996 +x_0=2520000 +y_0=0 +ellps=intl
> +units=m +no_defs]
> Number of points: 30
> Data attributes:
> nome
> Allerona : 1
> Amelia : 1
> Attigliano : 1
> Avigliano_Umbro : 1
> Bastardo : 1
> Calvi_dell_Umbria: 1
> (Other) :24
> [[Temporal:]]
> Index timeIndex
> Min. :1991-01-01 Min. : 1
> 1st Qu.:1996-10-01 1st Qu.:2101
> Median :2002-07-02 Median :4201
> Mean :2002-07-02 Mean :4201
> 3rd Qu.:2008-04-01 3rd Qu.:6301
> Max. :2013-12-31 Max. :8401
> [[Data attributes:]]
> values
> Min. : 0.000
> 1st Qu.: 0.000
> Median : 0.000
> Mean : 1.489
> 3rd Qu.: 0.000
> Max. :273.000
>
> In the space slot I have 30 points.
> For each point I have a xts element:
> For the first point the xts element is:
> > summary(pioggieST1[1,])
> Index values timeIndex
> Min. :1991-01-01 Min. : 0.000 Min. : 1
> 1st Qu.:1996-10-01 1st Qu.: 0.000 1st Qu.:2101
> Median :2002-07-02 Median : 0.000 Median :4201
> Mean :2002-07-02 Mean : 2.105 Mean :4201
> 3rd Qu.:2008-04-01 3rd Qu.: 0.200 3rd Qu.:6301
> Max. :2013-12-31 Max. :176.800 Max. :8401
>
> or
>
> > head(pioggieST1[1,])
> values timeIndex
> 1991-01-01 0 1
> 1991-01-02 0 2
> 1991-01-03 0 3
> 1991-01-04 0 4
> 1991-01-05 0 5
> 1991-01-06 0 6
>
> For each day I have to calculate the sum of "values" relative to the day +
> the "values" of the day -1 and the day -2
>
> How can I do that simply?
>
> Thanks
> Pierluigi
>
>
Dear Dr. De Rosa,
Please excuse me, what I meant was whether you may attach a fraction of the
array pioggieST1, even a modified one, so we could work on it.
Best regards,
Jue
> 2015-07-20 10:43 GMT+02:00 Jue Lin-Ye <jl.iccp at gmail.com>:
>
>> Dear Dr. De Rosa,
>>
>> May you attach some data to your e-mail so we could reproduce your case?
>>
>> Best regards,
>>
>> --
>> Jue
>>
>
>
>
> --
> Ing. Pierluigi De Rosa (PhD)
> cel: 3497558268 / fax: 075 7823038
> skype: pierluigi.derosa
>
[[alternative HTML version deleted]]
More information about the R-sig-Geo
mailing list