Plot MDS

Share:

Description

This function plots all the data on an MDS plot.

Usage

1
	plotMDS(data, groups, estGstar = TRUE, paired = FALSE, returnCoords = FALSE, ...)

Arguments

data

A data frame in which the columns (subjects) contain a 0/1 value for row (Node or Edge).

groups

A vector of integers used to denote the group membership of columns in the data.

estGstar

When TRUE, the g star for every group is calculated and plotted.

paired

When TRUE, line segments between pairs will be drawn.

returnCoords

When TRUE, the MDS x-y coordinates will be returned.

...

Arguments to be passed to the plot method.

Value

An MDS plot and if returnCoords is TRUE, a 2 column data frame containing the x-y coordinates of the data points is also returned.

Author(s)

Berkley Shands, Elena Deych, William D. Shannon

Examples

1
2
3
4
5
6
7
8
9
	data(braingraphs)
	
	grps <- c(rep(0, 19), rep(1, 19))
	
	### Basic plot
	plotMDS(braingraphs, grps, main="My MDS Plot")
	
	### Paired Plot
	plotMDS(braingraphs, grps, TRUE, main="My Paired MDS Plot")