knitr::opts_chunk$set(
  collapse = TRUE,
  comment = "#>",
  fig.path = "man/figures/README-",
  out.width = "100%"
)

eltr

Lifecycle: experimental R build status Codecov test coverage [cran version] [downloads]

The goal of eltr is to help analysis of catastrophe model outputs.

Installation

You can install the version on Cran with:

install.packages("eltr")

You can install the development version from GitHub with:

# install.packages("devtools")
devtools::install_github("RandhirBilkhu/eltr")

Example

This is a basic example which shows you how to solve a common problem:

library(eltr)
## load a rawelt file

raw_elt <- eltr::example_elt

raw_elt

## paramterise elt

elt <- create_elt(raw_elt, ann_rate="rate", mu="mean", sdev_i = "sdevi" , sdev_c = "sdevc", expval = "exp")

## generate a YLT 

ylt <- create_ylt(elt, sims=10 ,ann_rate = "rate" , event_id = "id", expval = "exp" , mu ="mean")

ylt

### calculate AAL and OEP

ann <-ylt[ ,Loss :=sum(Loss) , by=Year]

ep <- create_oep_curve(ann , y= "Year", z="Loss")

Hurricane icon icon by Icons8



RandhirBilkhu/catr documentation built on Jan. 28, 2021, 11:51 a.m.