how to do integral in r i have a data frame where each row represent a community with number of species and number of individuals: