plot.CCM: Plot CCM correlations

Description Usage Arguments Details Value Author(s) See Also Examples

View source: R/plot.cors.R

Description

Constructs a boxplot of correlations by class for a test sample

Usage

1
2
## S3 method for class 'CCM'
plot(x, y, index,  no.plot, ...)

Arguments

x

a CCM correlation matrix as obtained from create.CCM

y

classes corresponding to the training samples (columns) of 'K'

index

the test sample to include in the plot, corresponding to the row of 'K'.

no.plot

if TRUE then plotting is turned off and a list of correlations is returned

...

additional arguments for boxplot

Details

This function generates a boxplot of correlations between the training samples and a specific test sample by class

Value

if no.plot is TRUE, then a list of correlations by class

Author(s)

Garrett M. Dancik and Yuanbin Ru

See Also

boxplot; create.CCM for creating the CCM correlation matrix

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
     ## load data ##
     data(data.expr)
     data(data.gender)
     
     ## split dataset into training / testing ##
     train.expr = data.expr[,1:20]
     test.expr = data.expr[,21:40]
     train.gender = data.gender[1:20]
     test.gender = data.gender[21:40]
     
     ## CCM using spearman correlation ##
     K = create.CCM(test.expr, train.expr, method = "spearman")
     
     ## plot correlations for the 3rd observation ##
     plot(K, train.gender, index = 3, main = "correlations for obs #3", 
	       xlab = "gender", ylab = "correlation") 

CCM documentation built on April 12, 2018, 5:03 p.m.