Dear R-list users,
I have 10 data frames (called df1, df2, ... df10), where each of them contains 
snow data from an automatic meteorological station (obviously each station has 
a different station code).
Here is an example of df1:

station_code date_factor date_POSIX snow
217 1999-12-15 1999-12-15  0
217 1999-12-16 1999-12-16  0
217 1999-12-17 1999-12-17 38
217 1999-12-18 1999-12-18 31
217 1999-12-19 1999-12-19 21
217 1999-12-20 1999-12-20 12
217 1999-12-21 1999-12-21 42
217 1999-12-22 1999-12-22 61
217 1999-12-23 1999-12-23 57
217 1999-12-24 1999-12-24 48
...

where
> sapply(df1, class)
$station_code
[1] "numeric"

$date_factor
[1] "factor"

$date_POSIX
[1] "POSIXct" "POSIXt"

$snow
[1] "integer"

Given a series of max three intervals (example with two intervals: from 1st to 
12th of January 2000 and from 23rd to 28th of March 2000), I need to evaluate 
for each station the total snow cumulate for all the intervals selected, and 
finally create a data frame where for each line there is the station code and 
the snow cumulate. It should be like

station_code total_snow_cumulate
217 125
218 80
...

Could somebody show me a direction for an efficient solution?

Thank you for your attention and your help
Stefano


         (oo)
--oOO--( )--OOo----------------
Stefano Sofia PhD
Area Meteorologica e  Area nivologica - Centro Funzionale
Servizio Protezione Civile - Regione Marche
Via del Colle Ameno 5
60126 Torrette di Ancona, Ancona
Uff: 071 806 7743
E-mail: stefano.so...@regione.marche.it
---Oo---------oO----------------

________________________________

AVVISO IMPORTANTE: Questo messaggio di posta elettronica può contenere 
informazioni confidenziali, pertanto è destinato solo a persone autorizzate 
alla ricezione. I messaggi di posta elettronica per i client di Regione Marche 
possono contenere informazioni confidenziali e con privilegi legali. Se non si 
è il destinatario specificato, non leggere, copiare, inoltrare o archiviare 
questo messaggio. Se si è ricevuto questo messaggio per errore, inoltrarlo al 
mittente ed eliminarlo completamente dal sistema del proprio computer. Ai sensi 
dell’art. 6 della DGR n. 1394/2008 si segnala che, in caso di necessità ed 
urgenza, la risposta al presente messaggio di posta elettronica può essere 
visionata da persone estranee al destinatario.
IMPORTANT NOTICE: This e-mail message is intended to be received only by 
persons entitled to receive the confidential information it may contain. E-mail 
messages to clients of Regione Marche may contain information that is 
confidential and legally privileged. Please do not read, copy, forward, or 
store this message unless you are an intended recipient of it. If you have 
received this message in error, please forward it to the sender and delete it 
completely from your computer system.

--
Questo messaggio  stato analizzato da Libra ESVA ed  risultato non infetto.
This message was scanned by Libra ESVA and is believed to be clean.


        [[alternative HTML version deleted]]

______________________________________________
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
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.

Reply via email to