% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/023_make_ep_by_sorting.R
\name{make_ep_by_sorting}
\alias{make_ep_by_sorting}
\title{Make an EP curve by sorting losses}
\usage{
make_ep_by_sorting(losses, rps)
}
\arguments{
\item{losses}{A vector of annual losses}

\item{rps}{A vector of return periods at which losses are required
Must be 1 or greater.}
}
\value{
Losses at the specified return periods, as integers.
}
\description{
Reads in a vector of losses, sorts them, and picks out certain return level losses
}
\details{
Assumes the input losses are one loss per year.
}
\examples{
#
# 1 create losses
#
cat("1. make losses:\n")
losses=seq(1,1000,1)
#
# 2 set the return periods to look at
#
rps=c(0.5,1,2,3,4,5,10,20,50,100,1000,10000)
#
cat("2. calculate the EP:\n")
op=make_ep_by_sorting(losses,rps)
#
print(op)

}
\author{
Stephen Jewson \email{stephen.jewson@gmail.com}
}
