DistFitLong | R Documentation |
These functions plot data by group, and overlay lines representing three family functions that are commonly used for count data: NB1, NB2, and Poisson. For more information on this, please reference this document.
DistFitLong(Splitters, Data, CountCol, GroupCol, GroupList, ThemeBlack = T) DistFitWide(Splitters, Data, GroupList, ThemeBlack = T)
Splitters |
A character vector of column names to aggregate data by. |
Data |
The unquoted name of the data frame or data table containing the raw data models are based on. |
CountCol |
A character string specifying the name of the vector containing count data. |
GroupCol |
A character string specifying the name of the vector containing group information (e.g., order, species) for each observation. |
GroupList |
A character vector of column names representing groups that define model membership (e.g., species, demographics). |
ThemeBlack |
A logical value indicating whether the plots generated should include |
These functions produces a mean/variance plot with NB1, NB2, and Poisson family function lines for
each group in the vector supplied to the GroupList
argument. Each resultant plot is named with
the group name followed by "DistPlot" (e.g., the plot associated with a group named "Epfu" would be named
"EpfuDistPlot".)
#DistFitWide Example data("BatDataWide", package = "EcoCountHelper") DistFitWide(c("Site", "Year"), BatDataWide, c("Myev", "Epfu")) EpfuDistPlot MyevDistPlot #DistFitLong Example data("BatDataLong", package = "EcoCountHelper") DistFitLong(c("Site", "Year"), BatDataLong, "Count", "Species", c("Myev", "Epfu")) EpfuDistPlot MyevDistPlot
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.