This is code accompanying the paper "Semi-parametric resampling with extremes" by T. Opitz, D. Allard, G. Mariéthoz.
The code in naive-resampling.R contains several illustrative examples of the naive resampling procedure.
The code in lifting-using-extreme-value-theory.R shows on simulated (replicated) data how we can generate lifted images with a target value for the return period of the risk functional r, here chosen to be the median.