Hazard curves of a user workbook
readHazardWorkbook.RdReads hazard curves tabulated by hand in an Excel workbook: one sheet per
curve kind named p=<kind> (for example p=mean or p=0.84), a column
Tn with oscillator periods in seconds and one column per intensity level
in g, named by the level, holding annual rates of exceedance. Reading
needs the suggested package readxl.
Value
A data.table with one row per positive cell: Tn (s), p (the
sheet's kind; a numeric kind written as a number, text otherwise), IT
(years), Sa (g), POE, AEP (1/year) and TR (years). Sheets
without intensity columns are skipped with a warning.
Mathematics
Each cell is an annual rate \(AEP\) at the intensity level of its
column; convertAEP() gives the probability of exceedance over the
investigation time IT and the return period \(1/AEP\). Cells with a
rate that is not positive are dropped. The curves are taken as supplied:
the workbook states which statistic of the hazard each sheet holds.
Examples
# The mean hazard curves of the package tests: five periods by 39 levels, sheet p=mean.
Workbook <- system.file("extdata", "hazardWorkbook.xlsx", package = "newmark")
if (requireNamespace("readxl", quietly = TRUE)) readHazardWorkbook(Workbook, IT = 50)
#> Tn p IT Sa POE AEP TR
#> <num> <char> <num> <num> <num> <num> <num>
#> 1: 0.0 mean 50 0.000010 1.000000e+00 2.629443e+00 3.803086e-01
#> 2: 0.1 mean 50 0.000010 1.000000e+00 2.598724e+00 3.848042e-01
#> 3: 0.2 mean 50 0.000010 1.000000e+00 2.662877e+00 3.755337e-01
#> 4: 0.5 mean 50 0.000010 1.000000e+00 2.720022e+00 3.676441e-01
#> 5: 1.0 mean 50 0.000010 1.000000e+00 2.727501e+00 3.666360e-01
#> ---
#> 185: 0.1 mean 50 7.001756 3.899683e-06 7.799381e-08 1.282153e+07
#> 186: 0.2 mean 50 7.001756 8.373106e-06 1.674628e-07 5.971475e+06
#> 187: 0.5 mean 50 7.001756 9.276111e-07 1.855223e-08 5.390188e+07
#> 188: 0.2 mean 50 10.073620 1.696145e-07 3.392290e-09 2.947861e+08
#> 189: 0.5 mean 50 10.073620 5.817400e-10 1.163480e-11 8.594905e+10