statespace_ch calculates the convex hull in 2-dimensional space, e.g. for two selected indicators, using the tri.mesh function.

statespace_ch(x, y, time, period_ref, period_current)



The coordinates of points in the first dimension (e.g. indicator 1 or PC1 scores from a PCA).


The coordinates of points in the second dimension (e.g. indicator 2 or the PC2 scores from a PCA).


A vector containing the actual time series.


Vector of time units (e.g. years) used as reference period (minimum of 3 time units required).


Vector of time units (e.g. years) used as current period to compare with the reference period (minimum of 3 time units required).


The function returns a list with the following elements


A vector of the position of the convex hull of the reference period.


A vector of the position of the convex hull of the current period.


A logical vector indicating whether each year (time step) of the current period lies inside (TRUE) or outside (FALSE) the state space domain of the reference period.


A data frame of the x and y coordinates.


A vector of the full time series.


A vector of years (time steps) defined as the reference period.


A vector of years (time steps) defined as the current period.


statespace_ch implements a second state space approach to assess the development of a suite of ecological state indicators (Otto et al. 2018, Tett et al. 2008). While unidimensional approaches such as the Euclidean distance (see statespace_ed) feature the disadvantage of defining one particular year or time step as reference condition, this approach accounts for inter-annual variation by defining a reference domain in state space based on several years: more recent observations might be characterized as either within or outside this domain.

The reference domain can be described by a convex hull, which is a multivariate measure derived from computational geometry representing the smallest convex set containing all the points in Euclidean plane or in Euclidean space (de Berg et al., 2008). While the convex hull can be calculated for high-dimensional data, reducing the space to two dimensions allows for an easier visualization and interpretation. Therefore, the statespace_ch function only calculates the convex hull for two dimensions, i.e. for two indicators or principal axes obtained by multivariate analysis such as a Principal Component Analysis (PCA).


de Berg, M., Cheong, O., van Kreveld, M., Overmars, M. (2008) Computational Geometry - Algorithms and Applications. Springer Berlin Heidelberg, 386pp.

Otto, S.A., Kadin, M., Casini, M., Torres, M.A., Blenckner, T. (2018) A quantitative framework for selecting and validating food web indicators. Ecological Indicators, 84: 619-631, doi:

Tett, P., Carreira, C., Mills, D.K., van Leeuwen, S., Foden, J., Bresnan, E., Gowen, R.J. (2008) Use of a Phytoplankton Community Index to assess the health of coastal waters. ICES Journal of Marine Science 65, 1475-1482.

See also

tri.mesh for the computation of the convex hull.

Other state assessment functions: plot_statespace_ch(), plot_statespace_ed(), statespace_ed()


# Using the Baltic Sea demo data in the package time <- ind_ex$Year period_ref <- 1979:1983 period_current <- 2004:2008 # Apply function on 2 indicators ch <- statespace_ch(x = ind_ex$TZA, y = ind_ex$MS, time, period_ref, period_current) # Conduct PCA on selected indicators using the correlation matrix (scale=T) ind_sel <- ind_ex[,c(2,3,4,8,10,11)] pca_out <- vegan::rda(ind_sel, scale=TRUE) pca_sum <- summary(pca_out) prop_expl <- as.vector(pca_sum$cont$importance[2,]) scores_unsc <- vegan::scores(pca_out, scaling = 0) scores_sites <-$sites) x <- scores_sites$PC1 y <- scores_sites$PC2 # Apply function ch <- statespace_ch(x, y, time, period_ref, period_current)