Re: [R] distribution of daily rainfall values in binned categories

From: Francisco J. Zagmutt <gerifalte28_at_hotmail.com>
Date: Wed 28 Jun 2006 - 13:51:31 EST


Hi Etienne,

Somebody asked a somehow related question recently. http://tolstoy.newcastle.edu.au/R/help/06/06/29485.html

Take a look at cut? table? and barplot?
i.e.
#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 tab=table(rain)

#Plots frequencies of rainfall
barplot(tab)

I hope this helps!

Francisco

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

>From: etienne <etiennesky@yahoo.com>
>To: r-help@stat.math.ethz.ch
>Subject: [R] distribution of daily rainfall values in binned categories
>Date: Tue, 27 Jun 2006 11:28:59 -0700 (PDT)
>
>Hi,
>
>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
>easily?
>
>Thanks,
>Etienne
>
>______________________________________________
>R-help@stat.math.ethz.ch mailing list
>https://stat.ethz.ch/mailman/listinfo/r-help
>PLEASE do read the posting guide!
>http://www.R-project.org/posting-guide.html



R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html Received on Wed Jun 28 15:11:37 2006

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.1.8, at Wed 28 Jun 2006 - 20:13:13 EST.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.