extract_indices_list(ind)

Compute SES (Observed, SES, MeanRd, CI, Pval) for each column of an index matrix.

statisticsfunctional diversity
Args:ind — matrix of observed vs. randomised indices
extract_indices_list <- function(ind) {
  indSES <- matrix(
    NA, nr = ncol(ind), nc = 7,
    dimnames = list(
      colnames(ind),
      c("Observed", "SES", "MeanRd", "CI025Rd", "CI975Rd", "Pval", "Nreps")
    )
  )
  for (i in 1:nrow(indSES)) {
    indSES[i, ] <- sesandpvalues_bis(
      obs = ind[1, i],
      rand = ind[-1, i],
      nreps = length(ind[, 1]) - 1,
      probs = c(0.025, 0.975),
      rnd = 2
    )
  }
  rownames(indSES) <- gsub("\\.", " ", rownames(indSES))
  return(indSES)
}