[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.
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 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)
>
>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 at 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
More information about the R-help
mailing list