get.node.info: Get the information for specified node

View source: R/get.node.info.R

get.node.infoR Documentation

Get the information for specified node

Description

Obtain the information for specified node from the output list of ipcaps2.

Usage

get.node.info(cluster.obj, node)

Arguments

cluster.obj

A list returned from the ipcaps2 function.

node

An integer representing a node number to enquire information as shown in the HTML output files.

Value

The return value is NULL if node's information does not exist or a list containing PCs, eigen.fit, index, and label as explained below:

  • $PCs is a matrix of pricipal components of this node.

  • $eigen.fit is a number represeting the EigenFit value of this node.

  • $index is a vector of row number (individuals) of raw.data (input data).

  • $label is the vector of labels of all individuals that belongs to this node.

Examples


# Importantly, bed file, bim file, and fam file are required
# Use the example files embedded in the package

BED.file <- system.file("extdata","ipcaps_example.bed",package="IPCAPS2")
LABEL.file <- system.file("extdata","ipcaps_example_individuals.txt.gz",package="IPCAPS2")

my.cluster <- ipcaps2(bed=BED.file,
                      label.file=LABEL.file,
                      lab.col=2,
                      out=tempdir(),
                      silence=TRUE,
                      no.rep=1)

#Here, to obtain the information of specified node, for example, node 3
node.info <- get.node.info(my.cluster,3)
ls(node.info)

kridsadakorn/ipcaps2 documentation built on June 11, 2022, 8:35 p.m.