Re: [R] Mean rain per rain day

2015-05-13 Thread Jim Lemon
Hi Frederic, It looks like you have a number of daily rainfall values and you want to get the mean rainfall on days where there was some rain. What you probably want is: daily_rainfall-rpois(50,2) mean(daily_rainfall[daily_rainfall0]) You may have to add na.rm=TRUE if there are NAs in your data.

[R] Mean rain per rain day

2015-05-13 Thread Frederic Ntirenganya
Hi All, I want to compute Mean rain per rain day from rainfall data but i don't know how to go about that. Anyone who understand the approach I can use can help me. In addition, I would like to have RScript which can help me to compute it. thanks. Regards, Frederic. Frederic Ntirenganya Maseno