Define the climate gradient to fit the pdfs.

fit_xrange(ccs, shape, bin_width, npoints = 500)

Arguments

ccs

A ccs object returned by calib_clim_space.

shape

The imposed shape of the species pdfs. We recommend using 'normal' for temperature variables and 'lognormal' for the variables that can only take positive values, such as precipitation or aridity. Default is 'normal' for all.

bin_width

The width of the bins used to correct for unbalanced climate state. Use values that split the studied climate gradient in 15-25 classes (e.g. 2°C for temperature variables). Default is 1.

npoints

The number of points to be used to fit the pdfs. Default 200.

Value

A regularly spaced climate gradient with npoints points.

Examples

# Creating one randomised climate space
climate_space <- sample(0:300 / 10, 4000, replace = TRUE)
ccs <- calib_clim_space(climate_space, 2)
xrange <- fit_xrange(ccs, "normal", 2)
head(xrange)
#> [1] -10.000000  -9.895792  -9.791583  -9.687375  -9.583166  -9.478958