clustering_stockshares_table: Tabelize stock shares of clusters

View source: R/FleetSegmentation.R

clustering_stockshares_tableR Documentation

Tabelize stock shares of clusters

Description

This function creates a table with the average shares of the stocks on the catch of each clusters vessel. The result is a data frame, which can be printed or stored as an object. Alternatively, an html-table can be created by setting style = "html".

Usage

clustering_stockshares_table(data, clustering, style = "basic")

Arguments

data

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

clustering

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

style

The style, in which the result is printed. Defaults to "basic". "html" produces an html-table.

Examples

library(tidyverse)
data <- example_catchdata
stockdata <- assign_stocks(data=data)
catchdata <- catchdata_transformation(data = stockdata)
clustering <- segmentation_clustering(catchdata = catchdata,n_cluster = 6)
clustering_stockshares_table(data = stockdata,clustering = clustering)
clustering_stockshares_table(data = stockdata,clustering = clustering,style = "html")
segments_stockshares <- clustering_stockshares_table(data = stockdata,clustering = clustering)

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