plot.CCM {CCM} | R Documentation |

## Plot CCM correlations

### Description

Constructs a boxplot of correlations by class for a test sample

### Usage

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

### Arguments

`x` |
a CCM correlation matrix as obtained from |

`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 |

### 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

```
## 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")
```

[Package

*CCM*version 1.2 Index]