View source: R/FleetSegmentation.R
single_cluster_stockshares | R Documentation |
This is function creates an overview barplot of the average shares of stocks on the catch of all the vessels in one cluster.
single_cluster_stockshares(
data,
clustering,
min_share = 5,
cluster.number,
label_wrap = 15
)
data |
The original, untransformed data that was used for the clustering. |
clustering |
The result of the clustering procedure, stored as a data frame. |
min_share |
The minimum average percentage share a stock has to have to be labelled in the plot. Defaults to 5%. |
cluster.number |
The number of the cluster of which vessel stock shares should be displayed. |
label_wrap |
Indicates the number of characters per line before a line break in the stock labels. Defaults to 15. |
library(tidyverse)
data <- example_catchdata
stockdata <- assign_stocks(data=data)
catchdata <- catchdata_transformation(data = stockdata)
clustering <- segmentation_clustering(catchdata = catchdata,n_cluster = 6)
single_cluster_stockshares(data = stockdata,clustering = clustering, cluster.number=1)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.