clustering_plotgrid: Plotgrid of number of ships, ship length, catch of single...

View source: R/FleetSegmentation.R

clustering_plotgridR Documentation

Plotgrid of number of ships, ship length, catch of single ships and total catch of ships in clusters

Description

This is function creates an overview plot grid of 1) A barplot of the number of ships in each cluster 2) A mixed dot- and boxplot of the length of ships in the clusters 3) A mixed dot- and boxplot of the catch of single ships in the clusters. 4) A barplot of the total catch of all ships in each cluster. Boxplots will only be drawn for clusters containing more than 5 ships.

Usage

clustering_plotgrid(data, clustering, shiplength, subset = NULL)

Arguments

data

The original, untransformed data that was used for the clustering.

clustering

The result of the clustering procedure, stored as a data frame.

shiplength

A data frame containing the length of the ships clustered.

subset

Display only a subset of clusters in plot. Can be a single number or a vector of numbers.

Examples

data <- example_catchdata
stockdata <- assign_stocks(data=data)
catchdata <- catchdata_transformation(data = stockdata)
clustering <- segmentation_clustering(catchdata = catchdata,n_cluster = 6)
clustering_plotgrid(data = stockdata,clustering = clustering,shiplength =example_lengthdata)

ESulanke/FleetSegmentation documentation built on March 27, 2023, 10:13 p.m.