NSCtrainInterface {ClassifyR} | R Documentation

## Interface for `pamr.train` Function from `pamr` CRAN Package

### Description

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

### Usage

      ## S4 method for signature 'matrix'
    NSCtrainInterface(measurements, classes, ...)
      ## S4 method for signature 'DataFrame'
    NSCtrainInterface(measurements, classes, ..., verbose = 3)
      ## S4 method for signature 'MultiAssayExperiment'
    NSCtrainInterface(measurements, targets = names(measurements), ...)

### Arguments

`measurements` | Either a `matrix`, `DataFrame` or `MultiAssayExperiment` containing the training data. For a `matrix`, the rows are features, and the columns are samples.
`classes` | Either a vector of class labels of class `factor` of the same length as the number of samples in `measurements` or if the measurements are of class `DataFrame` a character vector of length 1 containing the column name in `measurement` is also permitted. Not used if `measurements` is a `MultiAssayExperiment` object.
`targets` | If `measurements` is a `MultiAssayExperiment`, the names of the data tables to be used. `"clinical"` is also a valid value and specifies that numeric variables from the clinical data table will be used.
`...` | Variables not used by the `matrix` nor the `MultiAssayExperiment` method which are passed into and used by the `DataFrame` method or extra arguments passed to `pamr.train`.
`verbose` | Default: 3. 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.

### Details

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

### Value

A list with elements as described in `pamr.train`.

### Author(s)

Dario Strbenac

### See Also

`pamr.train` for the function that was interfaced to.

### Examples

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

        NSCtrainInterface(genesMatrix, classes)
      }

[Package ClassifyR version 2.8.0 Index]