[R] distribution of daily rainfall values in binned categories

Francisco J. Zagmutt gerifalte28 at hotmail.com
Wed Jun 28 05:51:31 CEST 2006

Hi Etienne,

Somebody asked a somehow related question recently.  

Take a look at cut? table? and barplot?
#Creates fake data from uniform(0,30)

x=runif(50, 0,30)

#Creates categories
rain=cut(x,breaks=c( 0, 1,2.5,5, 10, 20, Inf))

#Creates contingency table of categories

#Plots frequencies of rainfall

I hope this helps!


Dr. Francisco J. Zagmutt
College of Veterinary Medicine and Biomedical Sciences
Colorado State University

>From: etienne <etiennesky at yahoo.com>
>To: r-help at stat.math.ethz.ch
>Subject: [R] distribution of daily rainfall values in binned categories
>Date: Tue, 27 Jun 2006 11:28:59 -0700 (PDT)
>I'm a newbie in using R and I would like to have a few
>clues as to how I could compute and plot a
>distribution of daily rainfall intensity in different
>categories.  I have daily values (mm/day) for several
>years and I need to show the frequency of 0-1, 1-2.5,
>2.5-5, 5-10, 10-20, 20+ mm/day.  Can this be done
>R-help at stat.math.ethz.ch mailing list
>PLEASE do read the posting guide! 

More information about the R-help mailing list