Learn R Programming

DivInsight (version 0.1.0)

plot_sites_trend_H: Plot H against Date

Description

Plot Shannon's H on the Y axis and dates on the X axis with uniform spacing for each date and a line of best fit.

Usage

plot_sites_trend_H(
  clusterised_object,
  xlabel = "",
  ylabel = "Diversity (H)",
  main_title = "Shannon's H over Time"
)

Value

Returns a base R plot in the plot panel, depicting the trend of diversity index values over time.

Arguments

clusterised_object

An object created by the clusterise_sites function.

xlabel

The X axis label.

ylabel

The Y axis label with "Diversity (H)" as default.

main_title

The main title with "Shannon's H over Time" as default.

Examples

Run this code
# create a trend chart showing the diversity over time at the Caquetá province
Colombia_Caquetá_dataframe <- subset(Colombia, stateProvince == "Caquetá")

clusterised_Caquetá <- clusterise_sites(dataframe = Colombia_Caquetá_dataframe,
                                       cluster_min_length = 30,
                                       group_radius = 20000
)

plot_sites_trend_H(clusterised_Caquetá)

Run the code above in your browser using DataLab