## create the x dataset
library(floodRFA)
xx <- canadaFlood$daily
source(paste(getwd(),'R/nspot.R' , sep='/'))
ulst <- ThreshCandidate(xx, flow~date, u = .7, r = 14)
fit <- xx %>%
ExtractNsFloodPeaks(flow~date, u = ulst[1], r = 14, link = 'log') %>%
FitNsPot(flow~date, startp = c(2000,0))
plot(fit)
ref <- data.frame( date = seq(as.Date('2000-01-01'),as.Date('2010-01-01'), '1 years'))
u <- GetThresh(fit, ref)
m <- GetIndx(fit, ref)
u
m
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.