We use the effective number of species as a measure of diversity of a community. Shannon's function H' and other logarithmic or multiplicative indices of diversity give components of diversity which are difficult to interpret. Exp(H') and the reciprocal of Simpson's index, which measure the effective number of species, and linearly related to the number of species. The effective number of species is partitionable into components determined by resource dimension and their interaction. Components of diversity measure differences which are found by using various niche axes alone and together. Our method allows the analysis of the relations between the overall structure of the community or guilds and their resource space. The residual component of diversity measures the niche overlap of species in respect to the resource dimensions studied.