Re: [R] data from graph [SEC=UNCLASSIFIED]

From: <Augusto.Sanabria_at_ga.gov.au>
Date: Wed, 13 Jun 2007 13:23:30 +1000


Jam,

If you use "fpot" the GPD of package "evd" to calculate your return periods, you can generate the table you want by using the following commands:

RP <- c(10,100,500,1000) #return periods rf <- your clean vector of rainfall data thres <- the threshold for your data
nopy <- number of observations per year
rainf <- c()

For(i in 1:length(RP) ){

   q = fpot(rf,thres,mper=RP[i],npp=nopy,std.err=FALSE)    rainf[i] <- q$estimate[1]
}
#The next line prints the return periods:
plot(RP,rainf,log="x",type="l",ylab="rainfall",xlab="Return Period (yrs)" )

#The next line prints the table you want:
cbind(RP,rainf)

Hope it helps,

Augusto



Augusto Sanabria. MSc, PhD.
Mathematical Modeller
Risk & Impact Analysis Group
Geospatial & Earth Monitoring Division
Geoscience Australia (www.ga.gov.au)
Cnr. Jerrabomberra Av. & Hindmarsh Dr.
Symonston ACT 2601
Ph. (02) 6249-9155    

-----Original Message-----
From: r-help-bounces_at_stat.math.ethz.ch
[mailto:r-help-bounces_at_stat.math.ethz.ch] On Behalf Of umarporn charusombat Sent: Wednesday, 13 June 2007 8:35
To: r-help_at_stat.math.ethz.ch
Subject: [R] data from graph

hi
i just learn how to use R in my research i used extreame value package to get the return level of rainfall. the output i got as the graph plot between return level and period. i wonder how i can get the value from the graph as a table format. please help me thanks jam

        [[alternative HTML version deleted]]



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 and provide commented, minimal, self-contained, reproducible code.

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 and provide commented, minimal, self-contained, reproducible code. Received on Wed 13 Jun 2007 - 03:28:38 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Wed 13 Jun 2007 - 03:31:46 GMT.

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