densplot: densplot

densplotR Documentation

densplot

Description

Plots the mean and 95% confidence intervals of abundance, size and distribution of species in an object of class NPSForVeg.

Usage

densplot(
  object,
  Total = TRUE,
  top = NA,
  densargs = NA,
  compare = NA,
  labels = NA,
  ...
)

Arguments

object

Either a data.frame which is the output of the dens funciton, an object of class NPSForVeg or a list of such objects.

Total

Logical, defaults to TRUE. Indicates if the the total values for all species, should be plotted.

top

Numeric, defaults to NA. When not NA only the number of species indicated in top will be used for each dataset (see compare). If several datasets are used, then more than top species can be plotted, if the most common species are not the same in all datasets.

densargs

A required list, defaults to NA. The arguments in this list are passed to dens and are used to generate the data for the graph. Any argument that is valid for dens can be in this list, and should be written in argument=value format e.g. densargs=list(group="trees", years=c(2010:2013))

compare

A list of lists. Defaults to NA. This can be used to compare the dens values from several different data sets, such as trees from different parks, different time periods, or trees, saplings and seedlings from the same park. Each list will be passed on to dens, and can contain any arguments that are valid for that function. Entries in the list should be written in argument=value format e.g. compare=list( list(object=CATO, group="saplings", years=c(2010:2013)), list(object=CATO, group="seedlings", years=c(2010:2013)) ) Any number of datasets can be added using compare.

labels

A character vector, defaults to NA. Labels for each dataset, only used when compare is not NA

...

Other arguments passed to xyplot in the lattice package.

Details

This function uses the xyplot function in the lattice package to create plots that display means and 95% confidence intervals for a variety of measures of plants: - abundance, basal area, cover, and occupancy. The format of the display varies depending on the type of data to be displayed. If only a single dataset is considered (compare=NA), then each species will be displayed.

If two or more datasets are used, then each species is plotted in its own panel, with mean and CI for each dataset. In this case the legend uses the contents of labels to identify each dataset. If top=0 and Total=TRUE then only the totals are displayed. If top=NA then all species are displayed. One or more particular species can be selected by including a species= argument to densargs and / or compare.

Value

A plot of means and 95% confidence intervals.


NCRN/NPSForVeg documentation built on March 26, 2024, 7:13 a.m.