0

I am now using the package extRemes to construct a GEV distribution and I want to check how the package calculates the return level. I have tried the following codes:

library(extRemes)
return.level

enter image description here

return.level.fevd

enter image description here

As the figures show, R did not display the source code. I wonder how I can check the source code for the above function? Thanks for any help.

Thanks for @EmilBode, I have tried the following codes:

library(extRemes)
data(PORTw)
fit1 <- fevd(TMX1, PORTw, units="deg C", period.basis = "year")
get(paste0("return.level.fevd", tolower(fit1$method), pos=environment(return.level.fevd)))

However, I still get the following error: enter image description here

rene
  • 41,474
  • 78
  • 114
  • 152
Yang Yang
  • 858
  • 3
  • 26
  • 49
  • I think it _does_ show the source code, the only problem is that this code immediately passes on control to another function, so you have to check that function. if you don't know where to find that function, `get(paste0("return.level.fevd", tolower(x$method), pos=environment(return.level.fevd))` will give you that function (with x assigned of course) – Emil Bode Dec 21 '18 at 13:47
  • @EmilBode Hi, I have tried your code but an error still occurs. I have modified the question according to your advice, could you please check? Thanks a lot. – Yang Yang Dec 21 '18 at 22:26
  • 1
    I see I've made 2 typos, it should be `get(paste0("return.level.fevd.", tolower(x$method)), pos=environment(return.level.fevd))` – Emil Bode Dec 21 '18 at 23:46
  • `getAnywhere(fevd)`. – Rui Barradas Dec 22 '18 at 17:46

0 Answers0