This function generates a numeric sequence between a minimum and maximum value using one of three scaling methods:
"Linear", "Log10", or "Arcsinh". It supports signed transformations for logarithmic and arcsinh scaling.
Arguments
- min
A numeric value specifying the start of the sequence.
- max
A numeric value specifying the end of the sequence.
- len
An integer specifying the number of points in the sequence.
- scale
A character string specifying the scaling method. Must be one of
"Linear","Log10", or"Arcsinh".- cofactor
A numeric value used in the
"Arcsinh"transformation. Ignored for other scaling methods.
Examples
create_seq(min = 0, max = 1000, len = 50, scale = "Linear", cofactor = 5)
#> [1] 0.00000 20.40816 40.81633 61.22449 81.63265 102.04082
#> [7] 122.44898 142.85714 163.26531 183.67347 204.08163 224.48980
#> [13] 244.89796 265.30612 285.71429 306.12245 326.53061 346.93878
#> [19] 367.34694 387.75510 408.16327 428.57143 448.97959 469.38776
#> [25] 489.79592 510.20408 530.61224 551.02041 571.42857 591.83673
#> [31] 612.24490 632.65306 653.06122 673.46939 693.87755 714.28571
#> [37] 734.69388 755.10204 775.51020 795.91837 816.32653 836.73469
#> [43] 857.14286 877.55102 897.95918 918.36735 938.77551 959.18367
#> [49] 979.59184 1000.00000
create_seq(min = -100, max = 1000, len = 50, scale = "Log10", cofactor = 5)
#> [1] -100.0000000 -78.8331944 -62.1023657 -48.8778557 -38.4248372
#> [6] -30.1624821 -23.6316880 -18.4695677 -14.3892850 -11.1641167
#> [11] -8.6148544 -6.5998469 -5.0071293 -3.7482012 -2.7531096
#> [16] -1.9665617 -1.3448524 -0.8534362 -0.4650073 -0.1579823
#> [21] 0.0925365 0.3822093 0.7486854 1.2123282 1.7989002
#> [26] 2.5409948 3.4798467 4.6676238 6.1703257 8.0714508
#> [31] 10.4766362 13.5195275 17.3692045 22.2395768 28.4012694
#> [36] 36.1966603 46.0589047 58.5360039 74.3212550 94.2917744
#> [41] 119.5572354 151.5215277 191.9607653 243.1219775 307.8479661
#> [46] 389.7352675 493.3339959 624.4006737 790.2180954 1000.0000000
create_seq(min = -100, max = 1000, len = 50, scale = "Arcsinh", cofactor = 5)
#> [1] -100.0000000 -82.0473522 -67.3077938 -55.2041030 -45.2622824
#> [6] -37.0929963 -30.3763240 -24.8492311 -20.2952690 -16.5360981
#> [11] -13.4245041 -10.8386324 -8.6772168 -6.8556132 -5.3024850
#> [16] -3.9570096 -2.7664962 -1.6843227 -0.6681097 0.3219393
#> [21] 1.3245958 2.3791254 3.5268249 4.8126397 6.2869243
#> [26] 8.0074137 10.0414847 12.4687942 15.3843993 18.9024790
#> [31] 23.1608063 28.3261433 34.6007718 42.2304151 51.5138607
#> [36] 62.8146614 76.5753723 93.3348823 113.7495173 138.6187429
#> [41] 168.9164731 205.8292093 250.8025063 305.5975813 372.3602864
#> [46] 453.7051428 552.8177293 673.5794338 820.7194542 1000.0000000