testMarkers {pRoloc} | R Documentation

## Tests marker class sizes

### Description

Tests if the marker class sizes are large enough for the parameter optimisation scheme, i.e. the size is greater that `xval + n`, where the default `xval` is 5 and `n` is 2. If the test is unsuccessful, a warning is thrown.

### Usage

    testMarkers(object, xval = 5, n = 2, fcol = "markers",
      error = FALSE)

### Arguments

`object` | An instance of class `"MSnSet"`.
`xval` | The number cross-validation partitions. See the `xval` argument in the parameter optimisation function(s). Default is 5.
`n` | Number of additional examples.
`fcol` | The name of the prediction column in the `featureData` slot. Default is `"markers"`.
`error` | A `logical` specifying if an error should be thown, instead of a warning.

### Details

In case the test indicates that a class contains too few examples, it is advised to either add some or, if not possible, to remove the class altogether (see `minMarkers`) as the parameter optimisation is likely to fail or, at least, produce unreliable results for that class.

### Value

If successfull, the test invisibly returns `NULL`. Else, it invisibly returns the names of the classes that have too few examples.

### Author(s)

Laurent Gatto

### See Also

`getMarkers` and `minMarkers`

### Examples

    library("pRolocdata")
    data(dunkley2006)
    getMarkers(dunkley2006)
    testMarkers(dunkley2006)
    toosmall <- testMarkers(dunkley2006, xval = 15)
    toosmall
    try(testMarkers(dunkley2006, xval = 15, error = TRUE))

[Package pRoloc version 1.34.0 Index]