| fgeo_habitat {fgeo.analyze} | R Documentation | 
Create habitat data from measures of topography.
Description
This function constructs habitat data based on elevation data. It calculates habitats in two steps:
- It calculates mean elevation, convexity and slope for each quadrat. 
- It calculates habitats based on hierarchical clustering of the topographic metrics from step 1. 
Usage
fgeo_habitat(elev, gridsize, n, ...)
Arguments
| elev | One of these: 
 | 
| gridsize | Number giving the size of each quadrat for which a habitat
is calculated. Commonly,  | 
| n | Integer. Number of cluster-groups to construct (passed to the
argument  | 
| ... | Arguments passed to  | 
Value
A dataframe of subclass fgeo_habitat, with columns gx and gy,
rounded with accuracy determined by gridsize, and column habitats, with
as many distinct integer values as determined by the argument n.
Author(s)
Richard Condit.
See Also
fgeo.plot::autoplot.fgeo_habitat(), fgeo_topography().
Other habitat functions: 
fgeo_topography(),
tt_test()
Other functions to construct fgeo classes: 
fgeo_topography()
Examples
assert_is_installed("fgeo.x")
# Input a ForestGEO-like elevation list or dataframe
elevation_ls <- fgeo.x::elevation
habitats <- fgeo_habitat(
  elevation_ls,
  gridsize = 20, n = 4
)
str(habitats)
# Habitat data is useful for calculating species-habitat associations
census <- fgeo.x::tree6_3species
as_tibble(
  tt_test(census, habitats)
)