Re: [R-sig-eco] bootstrap and Levin index basics

2013-06-04 Thread Jinlong Zhang
Dear Luis, I think the bootstrap of levins niche breadth index can be attained via the following R code. Please also take a look at the comments provided. dat <- c(15, 456, 32, 21, 94) ### Define a function to calculate Levin's niche breadth calc_levins <- function(x){ pi <- x/sum(x) res

[R-sig-eco] bootstrap and Levin index basics

2013-06-03 Thread Luis Fernando García Hernández
Dear All I have been working on the R fully during very few time and I am really novice, so my question may look fool to many of you, but I need to do it. I have calculated Levin´s index (which is 1/sum(pi)˄2 where pi=available source i/sum of all sources) for some data and I have been suggeste