Learn R Programming

ClassifyR (version 1.6.2)

nearestShrunkenCentroidTrainInterface: Interface for pamr.train Function from pamr CRAN Package

Description

Restructures variables from ClassifyR framework to be compatible with pamr.train definition.

Usage

"nearestShrunkenCentroidTrainInterface"(expression, classes, ...) "nearestShrunkenCentroidTrainInterface"(expression, ..., verbose = 3)

Arguments

expression
Either a matrix or ExpressionSet containing the training data. For a matrix, the rows are features, and the columns are samples.
classes
A vector of class labels.
...
Extra arguments passed to pamr.train.
verbose
A number between 0 and 3 for the amount of progress messages to give. This function only prints progress messages if the value is 3.

Value

A list with elements as described in pamr.train.

Details

This function is an interface between the ClassifyR framework and pamr.train.

See Also

pamr.train for the function that was interfaced to.

Examples

Run this code
  if(require(pamr))
  {
    # Samples in one class with differential expression to other class.
    genesMatrix <- sapply(1:25, function(geneColumn) c(rnorm(100, 9, 1)))
    genesMatrix <- cbind(genesMatrix, sapply(1:25, function(geneColumn)
                                 c(rnorm(75, 9, 1), rnorm(25, 14, 1))))
    classes <- factor(rep(c("Poor", "Good"), each = 25))
    
    nearestShrunkenCentroidTrainInterface(genesMatrix, classes)
  }

Run the code above in your browser using DataLab