add_clust2ts: Add clustering assignments to time series data

View source: R/enrichment.R

add_clust2tsR Documentation

Add clustering assignments to time series data

Description

Add clustering assignments from clustering output to time series data list and store the data in a data frame.

Usage

add_clust2ts(plist, clustdat)

Arguments

plist

List storing patient time series data (also see function: patient_list)

clustdat

Object of type list storing clustering data (also see function: clust_matrix)

Value

Processed data frame storing time series data with added column indicating cluster assignments

Examples

list <- patient_list(
"https://raw.githubusercontent.com/MrMaximumMax/FBCanalysis/master/demo/phys/data.csv",
GitHub = TRUE)
#Sampling frequency is supposed to be daily
clustering <- clust_matrix(matrix, method = "kmeans", nclust = 3)
ts <- add_clust2ts(list, clustering)


MrMaximumMax/FBCanalysis documentation built on June 23, 2022, 8:21 p.m.