Re: [R] Dry Spell Problem.

2014-10-20 Thread Pascal Oettli
Hi,

Did you have a look at the "dw.spell" function from the "RMRAINGEN"
package? It might be a starting point for you.

Regards,
Pascal

On Mon, Oct 20, 2014 at 4:47 PM, Frederic Ntirenganya  wrote:
> Dear All,
>
> I want to solve the following problem on a climatic dataset. It contains
> Year, Day and Rain as Columns names.
>
> Ex: > head(Samaru56)
>   Year Day Rain
> 1 1928   10
> 2 1928   20
> 3 1928   30
> 4 1928   40
> 5 1928   50
> 6 1928   60
>
> The first day from April 01 that gets more than 20 mm on a single day, or
> totalled
> over 2 consecutive days with the additional condition that there is no 10
> day (or longer) dry spell in the next 30 days.
>
> Any help is appreciated. Thanks!!!
>
> Regards,
> Frederic.
> --
> Frederic Ntirenganya
> Maseno University,
> Kenya.
> Mobile:(+254)718492836
> Email: fr...@aims.ac.za
> https://sites.google.com/a/aims.ac.za/fredo/
>
> [[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.



-- 
Pascal Oettli
Project Scientist
JAMSTEC
Yokohama, Japan

__
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] Dry Spell Problem.

2014-10-20 Thread Frederic Ntirenganya
Dear All,

I want to solve the following problem on a climatic dataset. It contains
Year, Day and Rain as Columns names.

Ex: > head(Samaru56)
  Year Day Rain
1 1928   10
2 1928   20
3 1928   30
4 1928   40
5 1928   50
6 1928   60

The first day from April 01 that gets more than 20 mm on a single day, or
totalled
over 2 consecutive days with the additional condition that there is no 10
day (or longer) dry spell in the next 30 days.

Any help is appreciated. Thanks!!!

Regards,
Frederic.
-- 
Frederic Ntirenganya
Maseno University,
Kenya.
Mobile:(+254)718492836
Email: fr...@aims.ac.za
https://sites.google.com/a/aims.ac.za/fredo/

[[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.