Skip to contents

This is a helper function used for calculating fractal dimension using the height variation and standard deviation methods.

Usage

hvar(
  data,
  lvec = NULL,
  parallel = FALSE,
  ncores = (parallel::detectCores() - 1)
)

Arguments

data

Digital elevation model of class RasterLayer.

lvec

Scales to use for calculation.

parallel

Logical. Use parallel processing? Note: parallel must be installed.

ncores

Number of cores to use when parallel = TRUE.

Value

A data.frame containing height ranges of cells at different scales.

Examples


hvar(horseshoe, lvec = c(1, 2, 4, 8))
#>    l         h
#> 1  1 0.4138312
#> 2  1 0.3131361
#> 3  1 0.3095274
#> 4  1 0.2333255
#> 5  1 0.2886956
#> 6  1 0.4521708
#> 7  1 0.6388130
#> 8  1 0.7881522
#> 9  1 0.3909466
#> 10 1 0.4082861
#> 11 1 0.6127143
#> 12 1 0.2028646
#> 13 1 0.7069576
#> 14 1 0.7240741
#> 15 1 0.7118554
#> 16 1 0.6603565
#> 17 1 0.3828588
#> 18 1 0.3967733
#> 19 1 0.6435263
#> 20 1 0.5560226
#> 21 1 0.8209982
#> 22 1 0.7009950
#> 23 1 0.7127581
#> 24 1 0.5857501
#> 25 1 0.5888944
#> 26 1 0.5223045
#> 27 1 0.8119133
#> 28 1 0.9105260
#> 29 1 0.6384652
#> 30 1 0.9787853
#> 31 1 0.8261821
#> 32 1 0.6791756
#> 33 1 0.6892929
#> 34 1 0.9581645
#> 35 1 0.9660552
#> 36 1 0.3377664
#> 37 1 1.0119972
#> 38 1 1.0653005
#> 39 1 0.9757447
#> 40 1 0.7179971
#> 41 1 0.9473734
#> 42 1 0.9151280
#> 43 1 0.7382534
#> 44 1 0.9969518
#> 45 1 0.8230371
#> 46 1 1.0002651
#> 47 1 0.8928378
#> 48 1 0.7248907
#> 49 1 0.7516642
#> 50 1 0.5444973
#> 51 1 0.6740580
#> 52 1 0.9229848
#> 53 1 0.4463689
#> 54 1 0.8265104
#> 55 1 1.1452458
#> 56 1 1.3614206
#> 57 1 0.6336439
#> 58 1 0.9923670
#> 59 1 1.1091189
#> 60 1 0.7805500
#> 61 1 0.3974960
#> 62 1 0.7000456
#> 63 1 0.8536675
#> 64 1 0.6742055
#> 65 2 0.5169916
#> 66 2 0.6127143
#> 67 2 0.8386080
#> 68 2 0.8948445
#> 69 2 0.6774139
#> 70 2 0.9407241
#> 71 2 0.9958875
#> 72 2 0.9968965
#> 73 2 1.1133885
#> 74 2 1.0766172
#> 75 2 1.1218033
#> 76 2 1.0029795
#> 77 2 0.9923670
#> 78 2 1.1646364
#> 79 2 0.9986641
#> 80 2 1.3692834
#> 81 4 1.0646358
#> 82 4 1.0092955
#> 83 4 1.2300901
#> 84 4 1.3692834
#> 85 8 1.3692834