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)