Hi Marcio You might like to look at some equivalents from the field of ecology, for which there are existing functions. Have a look at the function "diversity" in the package "vegan". This provides the Simpson diversity index, which is the complement of the Gini coefficient (Gini = 1 - Simpson). See attached paper by Stirling (2007).
I'm not sure what you want to do with your weightings, but you could have a look at Rao's quadratic entropy index: this is a weighted diversity index (in ecology usually weighted by the abundance of the species, which are the objects for which diversity is measured). You can get this from the function "divc" in the package "ade4". There are also some other weighted diversity indices in the package "FD" (functional diversity). HTH Karen On Fri 03Sep10, Mestat wrote: > > Hi listers, > Does it necessary to install any package in order to use the GINI or INEQ > functions. > If I use the following command the R tells me that didn't find the GINI > function. > > x<-c(541, 1463, 2445, 3438, 4437, 5401, 6392, 8304, 11904, 22261) > G<-gini(x) > > Thanks in advance, > Marcio > -- > View this message in context: > http://r.789695.n4.nabble.com/Function-Gini-or-Ineq-tp2525852p2525852.html > Sent from the R help mailing list archive at Nabble.com. > > ______________________________________________ > R-help@r-project.org mailing list > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide http://www.R-project.org/posting-guide.html > and provide commented, minimal, self-contained, reproducible code. > > > -- > This message has been scanned for viruses and > dangerous content by MailScanner, and is > believed to be clean. > -- This message has been scanned for viruses and dangerous content by MailScanner, and is believed to be clean. ______________________________________________ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.