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, ...)

Arguments

elev

One of these:

  • A dataframe containing elevation data, with columns gx, gy, and elev, or x, y, and elev (e.g. fgeo.x::elevation$col).

  • A ForestGEO-like elevation list with elements xdim and ydim giving plot dimensions, and element col containing a dataframe as described in the previous item (e.g. fgeo.x::elevation).

...

Other arguments passed to methods.

gridsize

Number giving the size of each quadrat for which a habitat is calculated. Commonly, gridsize = 20.

xdim, ydim

(Required if elev is a dataframe) x and y dimensions of the plot.

edgecorrect

Correct convexity in edge quadrats?

Value

A dataframe of subclass fgeo_topography.

Acknowledgment

Thanks to Jian Zhang for reporting a bug (issue 59).

See also

fgeo_habitat().

Other habitat functions: fgeo_habitat(), tt_test()

Other functions to construct fgeo classes: fgeo_habitat()

Author

This function wraps code by Richard Condit.

Examples

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 rows
elev_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