ES.May {asbio}  R Documentation 
May and Beverton (1990) created the effective specialization index to quantify the degree of specialization of insects with potential host plants.
ES.May(mat, digs = 3)
mat 
A symmetric matrix with potential specialist hosts in rows and and the number species specializing on each of the host species in columns (see details below). 
digs 
The number of significant digits in output. 
The structure of the object mat
is nonintuitive. In the rows of the matrix are
species which can be selected by potential specialists (i.e. hosts). May and Beverton (1990)
used four oak species. The columns indicate the degree of specialization of
potential specialists. May and Beverton (1990) were interested in the specialization
of beetles. The first element (row 1, column 1) in their 4 x 4 matrix contained
only beetle species found on host 1. The second element (row 1, column 2) contained
the number of beetle species found on host 1 and one other host. The third element
(row 1, column 3) contained the number of beetle species found on host 1 and two
other hosts. The fourth element (row 1, column 4) contained the number of beetle
species occurring on all four hosts.
Output is a list
E.S_coefficients 

Nk 
The number of distinct specialists. 
Pki.matrix 
The proportion of potential specialists on the kth host 
N.matrix 
The raw data. 
fk.matrix 

fk.vector 
For the kth host, the proportion of species which are effectively specialized. 
Nk.vector 
The number of species which are effectively specialized on the kth host. 
Ken Aho and Jessica Fultz
May, R. M. and Beverton, R. J. H. (1990) How many species [and discussion]. Philosophical Transactions: Biological Sciences. 330 (1257) 293304.
#data from May and Beverton (1990) beetle<matrix(ncol=4,nrow=4,data=c(5,8,7,8,20,10,9,8,14,15,11,8,15,15,12,8), byrow=TRUE) ES.May(beetle)