R/fgeo_topography.R
fgeo_topography.Rd
Create topography data: convexity, slope, and mean elevation.
fgeo_topography(elev, ...) # S3 method for data.frame fgeo_topography( elev, gridsize, xdim = NULL, ydim = NULL, edgecorrect = TRUE, ... ) # S3 method for list fgeo_topography(elev, gridsize, edgecorrect = TRUE, ...)
elev | One of these:
|
---|---|
... | Other arguments passed to methods. |
gridsize | Number giving the size of each quadrat for which a habitat
is calculated. Commonly, |
xdim, ydim | (Required if |
edgecorrect | Correct convexity in edge quadrats? |
A dataframe of subclass fgeo_topography.
Thanks to Jian Zhang for reporting a bug (issue 59).
Other habitat functions:
fgeo_habitat()
,
tt_test()
Other functions to construct fgeo classes:
fgeo_habitat()
This function wraps code by Richard Condit.
assert_is_installed("fgeo.x") elev_list <- fgeo.x::elevation fgeo_topography(elev_list, gridsize = 20)#> # A tibble: 400 x 5 #> gx gy meanelev convex slope #> * <dbl> <dbl> <dbl> <dbl> <dbl> #> 1 0 0 365. -0.390 8.87 #> 2 0 20 365. -0.285 13.7 #> 3 0 40 367. 0.210 14.4 #> 4 0 60 367. 0.34 15.9 #> 5 0 80 362. -0.255 20.8 #> 6 0 100 358. -0.510 12.4 #> 7 0 120 359. -0.28 17.1 #> 8 0 140 360. -0.265 22.1 #> 9 0 160 362. 0.055 24.3 #> 10 0 180 364. 0.415 15.2 #> # … with 390 more rowselev_df <- elev_list$col fgeo_topography(elev_df, gridsize = 20, xdim = 320, ydim = 500)#> # A tibble: 400 x 5 #> gx gy meanelev convex slope #> * <dbl> <dbl> <dbl> <dbl> <dbl> #> 1 0 0 365. -0.390 8.87 #> 2 0 20 365. -0.285 13.7 #> 3 0 40 367. 0.210 14.4 #> 4 0 60 367. 0.34 15.9 #> 5 0 80 362. -0.255 20.8 #> 6 0 100 358. -0.510 12.4 #> 7 0 120 359. -0.28 17.1 #> 8 0 140 360. -0.265 22.1 #> 9 0 160 362. 0.055 24.3 #> 10 0 180 364. 0.415 15.2 #> # … with 390 more rows