Gentle decay (power-law) mapping function from sizes to arrival times
Source:R/power_law_mapping.R
power_law_mapping.RdGentle decay (power-law) mapping function from sizes to arrival times
Examples
# Generate a vector of sizes
sizes <- runif(100, 0, 100)
# Map the sizes to arrival times using a power-law mapping with delta = .5
power_law_mapping(sizes, .5)
#> [1] 0.0918772195 0.1955244494 0.1135000934 0.2575717989 0.2737786198
#> [6] 0.1098094148 0.8976912147 0.3116576088 0.1431398770 0.1670515840
#> [11] 0.3113688110 0.0695225049 0.3413137187 0.5136424587 0.7575116023
#> [16] 0.7030369920 0.4436673228 0.2816119425 0.1860977223 0.3660049051
#> [21] 0.0416000773 0.4648684252 0.3252609672 0.4290668483 0.1931105979
#> [26] 0.4999616352 0.3106830842 0.1231226124 0.7304616038 0.0618134495
#> [31] 0.4231274353 0.0815414810 0.4164325710 0.4278342420 0.3123095665
#> [36] 0.0526762137 0.0678071428 0.3797109166 0.1167371917 0.0165029829
#> [41] 0.3439829041 0.1550159574 0.3715322972 0.4353979014 0.1285079379
#> [46] 0.5600430806 0.1558580883 0.6670202914 0.5129175787 0.6353935349
#> [51] 0.5190964637 0.7836404571 0.1985577789 0.0612979071 0.1158165627
#> [56] 0.1052612505 0.3281350115 0.3633906889 0.0975582184 0.2227117605
#> [61] 0.1906767087 0.4107629243 0.4876167307 0.0000000000 0.2041786979
#> [66] 0.5480078637 0.6554484000 0.3109994901 0.0356545798 0.2267754606
#> [71] 0.0084643943 0.1434504143 0.4077133702 0.3464662872 0.6285875424
#> [76] 1.0000000000 0.1531747856 0.6967138202 0.3349997736 0.1999519472
#> [81] 0.0004316139 0.2981730603 0.3063985869 0.5953974248 0.1298362034
#> [86] 0.3291834148 0.2869351182 0.5544486829 0.5308853678 0.2287907264
#> [91] 0.2427087077 0.7444244017 0.8485713354 0.1982348055 0.0332542482
#> [96] 0.2272168961 0.2521846535 0.2763780134 0.0038809420 0.2894649066