autoplot.filled_trait: Coverage plot of filled Traits

View source: R/coverage_plot.R

autoplot.filled_traitR Documentation

Coverage plot of filled Traits

Description

Function calculates the trait coverage of the community for each level of the sampling hierarchy and makes a barplot.

Shows at which level the data are coming from in each plot.

Usage

## S3 method for class 'filled_trait'
autoplot(object, other_col_how, ...)

Arguments

object

output from trait_fill().

other_col_how

what to do with the other columns in other data. Options are to filter by one of the columns, add them to the x-axis, facet by them, or to ignore.

...

optional filters for use with other_col_how = "filter"

Value

a ggplot2 plot

Examples

require("ggplot2")
data(community)
data(trait)
filled_traits <- trait_fill(
  comm = community, traits = trait,
  scale_hierarchy = c("Site", "PlotID"),
  taxon_col = "Taxon", value_col = "Value",
  trait_col = "Trait", abundance_col = "Cover"
)
autoplot(filled_traits)

richardjtelford/traitstrap documentation built on April 7, 2024, 1:39 a.m.