read.tree: read cluster tree information as obtained through Matlab

Description Usage Arguments Details Value Author(s) Examples

View source: R/clusterluts.R

Description

The mat-file is expected to have one component "cluster.info" which, in turn contains a list of lists. Each of the latter is a nx1 matrix with cluster assignments (the number of clusters at each cut is given by the number of unique entries)

Usage

1
2
3
4
5
6
read.tree(
  file = system.file("extdata/sbm_1_145_0_atlas.mat", package = "clusterLUTs"),
  path = ".",
  add.full = TRUE,
  ...
)

Arguments

file

Matlab hclust result file (Matlab *.mat-file)

path

directory where to find file

add.full

add a fully specified column if there is none?

...

ignored

Details

Each of these matrices (vectors) is forms one column in the output matrix as would be obtained by cutree. The matrix is given column names indicating the number of clusters for that cut.

Value

a matrix with just the cluster assignments

Author(s)

Benno Pütz puetz@psych.mpg.de

Examples

1
   tree <- read.tree()

bennop/clusterLUTs documentation built on Nov. 21, 2020, 9:07 a.m.