DataFilter$minAvgCountConstraint {IdMappingAnalysis} | R Documentation

## Perform mean based thresholding of an input vector

### Description

Perform mean based thresholding of an input vector.

### Usage

    ## Static method (use this):
    ## DataFilter$minAvgCountConstraint(x, filtParams, ...)

    ## Don't use the below:
    ## S3 method for class 'DataFilter'
    minAvgCountConstraint(static, x, filtParams, ...)

### Arguments

`x` | `numeric` input `vector`.
`filtParams` | `vector` of constraint parameters. If the mean of an input vector is less than filterParams[1] the whole vector is replaced by `NA` 's vector of the same length.
`...` | Not used

### Value

`numeric` `vector` or vector of `NA` 's depending on thresholding criteria.

### Author(s)

Alex Lisovich, Roger Day

### See Also

For more information see `DataFilter`.

### Examples

     #set to NA protein count rows which contain less than 50 percent of counts >=2
     fltExperimentSet<-DataFilter$do.apply(examples$msmsExperimentSet,
       byRows=TRUE,filterFun=DataFilter$minAvgCountConstraint,filtParams=0.5,verbose=TRUE);

     #print the number of rows set to NA
     sum(is.na(rowSums(fltExperimentSet[,-1])))

[Package IdMappingAnalysis version 1.28.0 Index]