[R] data from graph [SEC=UNCLASSIFIED]

Augusto.Sanabria at ga.gov.au Augusto.Sanabria at ga.gov.au
Wed Jun 13 05:23:30 CEST 2007


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.



More information about the R-help mailing list