add_cluster: Add the clusterization results to the full data

View source: R/surv_cluster.r

add_clusterR Documentation

Add the clusterization results to the full data

Description

Add the clusterization results to the full data

Usage

add_cluster(data, cluster_res, id, name_to = paste0(id, "Cluster"))

Arguments

data

data.frame with the full data to wich the clusterized column will be added.

cluster_res

export of the 'surv_cluster' function, usually with only one covariate.

id

name of the unclusterized column, used in the join.

name_to

name of the clusterized column.

Value

a data.frame with the same columns as the input, plus the cluster column.


vitorcapdeville/survtools documentation built on Feb. 12, 2023, 12:01 p.m.