This function calculates the mean of an environmental variable weighted by the cumulative probability of each value of the environmental gradient extracted from a species distibution model (e.g. MAXENT)

1 | ```
pno.weighted.mean(x, subset = NULL, normalize = TRUE)
``` |

`x` |
A data frame or matrix with columns corresponding to species and rows corresponding to values along an environmental gradient. The first columns contains the environmental variable, the remaining colums probabilities of suitability. |

`subset` |
A vector of mode |

`normalize` |
A logical, indicating whether to normalize PNOs prior to calculation of weighted means. |

A vector of weighted means corresponding to the columns in `x`

.

Christoph Heibl

Evans, M. E. K., S. A. Smith, R. S. Flynn, and M. J. Donoghue. 2009. Climate, niche evolution,
and diversification of the 'bird-cage evening primroses' (*Oenothera*, sections *Anogra* and
*Kleinia*) *Am. Nat.* **173**: 225-240.

Questions? Problems? Suggestions? Tweet to @rdrrHQ or email at ian@mutexlabs.com.

Please suggest features or report bugs with the GitHub issue tracker.

All documentation is copyright its authors; we didn't write any of that.